lmhart Posted November 6, 2009 Share Posted November 6, 2009 I need assistance to get this to work correctly. I can not figure out how to put quotes around something in my select statement This works from phpMyAdmin select * from orders where date="11-06-09" but my statement on my page does not work cause I can not figure out how to get the ""in the statement. I vefired by echoing $today was giving the correct var. $result = mysql_query("SELECT * FROM orders where date = ".$today." "); Thanks Link to comment https://forums.phpfreaks.com/topic/180570-solved-select-statement-help/ Share on other sites More sharing options...
mrMarcus Posted November 6, 2009 Share Posted November 6, 2009 try: $result = mysql_query("SELECT * FROM orders WHERE date = '".$today."'"); this is concatenation. Link to comment https://forums.phpfreaks.com/topic/180570-solved-select-statement-help/#findComment-952644 Share on other sites More sharing options...
lmhart Posted November 6, 2009 Author Share Posted November 6, 2009 thanks Link to comment https://forums.phpfreaks.com/topic/180570-solved-select-statement-help/#findComment-952645 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.