Why sprintf for query?

From: Date: Thu, 01 Feb 2001 00:38:41 +0000
Subject: Why sprintf for query?
Groups: php.general 
Request: Send a blank email to php-general+get-37570@lists.php.net to get a copy of this message
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!

« previous php.general (#37570) next »