Re: what is the point of prepare?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hulf wrote:

> Begining using the php5 mysql functions and want to know what is the
> point of preparing/binding the data before I insert it?
> 
> $prep = $mysqli->prepare ("INSERT INTO cd (cdid,title,artist) VALUES
> ('0',?,?)"); $prep->bind_param ('22',$title,$artist);

It's a performance measure - by preparing sql statements, you save on
the parsing and the network traffic.  Unless you're doing lots of
database transactions per second, I doubt if you'll notice it.



/Per Jessen, Zürich

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux