mysql vs. mysqli, how to call stored procedure from php



Hello PHP Group,

Is there any advantages (or disadvantages) in using mysqli instead of
mysql (querys, connections to database, etc).

I am currently using mysql_connect, and things like this:
$result = @mysql_query("SELECT * FROM images3 WHERE id=" . $img . "
AND p=" .$p. "");

to access my database. I see that some people are using the
equivalent stuff but with the mysqli style, etc I know the 'i" stands
for "improved", Being new to this stuff, i wonder what the difference
might be.

Also, how do I call a stored procedure from PHP.

i have tried this, but I get errors: $result = @mysql_query("call
sp_max_records (100)");
this procedure returns the MAX(id) from my database.

Thanks for a great group - one of the most responsive.

eholz1

.



Relevant Pages

  • Re: user permissions
    ... A user should be able to kill connections only for a specific database. ... stored procedure, by doing an EXECUTE AS LOGIN and then kill any connection. ...
    (microsoft.public.sqlserver.security)
  • Re: MySQL connect failure
    ... you can include $Database as the 4th parameter in your mysqli ... I didn't add the database to the mysqli parameter list. ... And see what error messages you get. ... Or check your PHP error log (which ...
    (comp.lang.php)
  • Re: MySQL connect failure
    ... you can include $Database as the 4th parameter in your ... I didn't add the database to the mysqli parameter list. ... The "mysqli" is the very first MySQL ... Default host for mysql_connect(doesn't apply in safe mode). ...
    (comp.lang.php)
  • Re: MySQL connect failure
    ... you can include $Database as the 4th parameter in your mysqli ... I didn't add the database to the mysqli parameter list. ... And see what error messages you get. ... Or check your PHP error log (which ...
    (comp.lang.php)
  • Re: MySQL connect failure
    ... "Erwin Moller" ... you can include $Database as the 4th parameter in your mysqli ... I didn't add the database to the mysqli parameter list. ... Default host for mysql_connect(doesn't apply in safe mode). ...
    (comp.lang.php)