mysqli_stmt_prepare() vs mysqli_prepare()

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
User avatar
kaisellgren
DevNet Resident
Posts: 1675
Joined: Sat Jan 07, 2006 5:52 am
Location: Lahti, Finland.

mysqli_stmt_prepare() vs mysqli_prepare()

Post by kaisellgren »

Hi,

I wonder what is the difference between mysqli_stmt_prepare() and mysqli_prepare(). The documentation, for change, has faulty information and in addition, it lacks of some.

I bet mysqli_prepare() is just an alias, but I am not 100% sure, and I must be.
User avatar
Benjamin
Site Administrator
Posts: 6935
Joined: Sun May 19, 2002 10:24 pm

Re: mysqli_stmt_prepare() vs mysqli_prepare()

Post by Benjamin »

From what I see, mysqli_stmt_prepare is for procedural style whereas mysqli_prepare can be used as a method of the mysqli object.

http://us2.php.net/manual/en/mysqli-stmt.prepare.php
User avatar
kaisellgren
DevNet Resident
Posts: 1675
Joined: Sat Jan 07, 2006 5:52 am
Location: Lahti, Finland.

Re: mysqli_stmt_prepare() vs mysqli_prepare()

Post by kaisellgren »

Hmm, a good point. I didn't notice that.
Post Reply