I have these lines in a php script to query the DB.
$rs_menucategories = mysql_query('SELECT `MenuCategoryID`, `MenuCategoryName` FROM `universitymenucategory`');
$q_menuitems = 'SELECT `MenuCategoryID`, `Order`, `ItemName`, `ItemCost`, `ItemDescription`'
. ' FROM `universitymenu`'
. ' WHERE `MenuCategoryID` = %d'
. ' ORDER BY `Order` ASC';
The only reference I can find for using %d is date formatting.
What exactly is %d doing here? Nothing in this query has anything to do with date.
Many thanks
Tags: