Jump to content

Adding more to a query


graham23s

Recommended Posts

Hey Guys,

 

i have my query like this:

 

$q_sold = "SELECT `PRODUCT_ID`, SUM(QUANTITY) as `QTY` FROM `fcp_orders_master_log` GROUP BY `PRODUCT_ID` ORDER BY `QTY` DESC";

 

i was wanting to add another clause to it:

 

WHERE `PROCESSED`='Y'

 

i didn't want to tamper with it just incase i mucked it up lol is it ok to just append this to the end or would i need to do more to it?

 

thanks guys

 

Graham

 

 

Link to comment
https://forums.phpfreaks.com/topic/139188-adding-more-to-a-query/
Share on other sites

it's crazy i personally do the capitals to distinguish between the mysql code and my tables it's easier on the eye i think lol

 

i used to think if it wasn't capitals it wouldn't work so as a rule of thumb i just stuck with it :)

 

thanks DW

 

Graham

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.