Help | Site Map
Connecting Tech Pros Worldwide
 
 
LinkBack Thread Tools
  #1  
Old February 27th, 2007, 07:05 PM
eholz1
Guest
 
Posts: n/a
Default 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

  #2  
Old February 27th, 2007, 11:15 PM
Sjoerd
Guest
 
Posts: n/a
Default Re: mysql vs. mysqli, how to call stored procedure from php

eholz1 wrote:
Quote:
Is there any advantages (or disadvantages) in using mysqli instead of
mysql (querys, connections to database, etc).
Mysqli offers:
- Object-oriented interface
- Prepared statements
- Bound input and output parameters
- SSL connections
- Multi-query functions
- Designed to work with the version 4.1.3 or above of MySQL
 

Bookmarks

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

What is Bytes?

We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights. Get the best answers to your questions from over network members.
Post your question now . . .
It's fast and it's free

Popular Articles