Re: mysqli problem with stmt and binding parameters.



On Mon, 30 Jul 2007 09:13:15 -0700, sugapablo <sugapablo@xxxxxxxxxxx> wrote:

I have a website that I was moving from another server to mine for
somebody. This website uses mysqli functions.

mysqli extensions are installed on my Linux server, PHP is 5.1.6 and
and MySQL is 4.1.22 (both higher than his server).

How much higher is the MySQL - presumably just the minor version?

All seems to work fine, but any statement that uses the bind (i.e.
placing a ? in the sql statement, and then binding variables to it)
does not work in my server, only his.

In what way does it not work? Errors? Blank pages? Flame pouring out the back
of the computer?

Usual drill: put error_reporting to maximum, make sure you're not suppressing
errors with "@".

Two questions, comparing phpinfo() on both servers, I can't find any
differences that would cause this problem. Does anyone have any ideas
on where to look?

And two, does anyone know how I can echo the prepared sql statement so
I can see what the final product looks like that gets sent to MySQL?

If you're using mysqli, and you're expecting to see an SQL statement with the
values embedded and escaped into it, actually the statement with placeholders
/is/ the final product sent to MySQL - MySQL 4.x+ supports placeholders
natively.

If you were just after the SQL, then find the place where prepare() gets
called, and add some debugging there.

--
Andy Hassall :: andy@xxxxxxxxxxx :: http://www.andyh.co.uk
http://www.andyhsoftware.co.uk/space :: disk and FTP usage analysis tool
.



Relevant Pages

  • Export fast, my code slow =[
    ... ODBC driver or the server (MySQL, ... I think the above code is sending an "INSERT INTO" SQL statement to ... The reason I posted this to the MSAccess group instead of MySQL/MyODBC ...
    (comp.databases.ms-access)
  • Re: Connection problems - PHP MySQL
    ... create a database connection I get the "Your PHP server doesn't have the ... MySQL module loaded or you can't use the mysql_connect functions" ... I have downloaded the latest mysqli and mysql extensions (PHP ...
    (comp.lang.php)
  • Re: mysqli problem with stmt and binding parameters.
    ... This website uses mysqli functions. ... and MySQL is 4.1.22 (both higher than his server). ... does anyone know how I can echo the prepared sql statement so ... I can see what the final product looks like that gets sent to MySQL? ...
    (comp.lang.php)
  • RE: MySQL/PHPMyAdmin on FC3 Connection Problem
    ... // You can disable a server config entry by setting host to ''. ... MySQL server ... MySQL control user settings ... table to describe the display fields ...
    (Fedora)
  • Re: MySQL connect failure
    ... I didn't add the database to the mysqli parameter list. ... The "mysqli" is the very first MySQL command I ... Jerry Stuckle ... JDS Computer Training Corp. ...
    (comp.lang.php)