Karl,
where is the first line from? it's pretty useless overhead.
$q = 'SELECT prodnum, childdesc FROM prodaval' would be second fastest
(the string is now parsed as it is in single quotes).
fastest would be to directly feed the statement to the query function
(e.g. mysql_query) instead of storing it in a variable before.
Cheers,
Ben
"Karl J. Stubsjoen" wrote:
>
> Sprintf formats strings and numbers to a specific format (correct?) then why
> is this
>
> $q = SPRINTF("SELECT prodnum, childdesc FROM prodaval");
>
> like that? Why SPRINTF in this case? We are calling a MySQL table, is it
> specific to calling a MySQL table or is this required for all calls to a
> DB... or (simply) could it be written like this
>
> $q = "SELECT prodnum, childdesc FROM prodaval";
>
> Thanks!
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]