ccrevcypsys Posted September 19, 2007 Share Posted September 19, 2007 I have to come up with a problem that makes the rows query before today has passed: heres the code i have: $todays_date = ; $old_date= date(Ymd); $final= $todays_date>$old_date; $old_events_query="SELECT * FROM ".$glob['dbprefix']."StreamRush_events WHERE date = ".$final." AND customer_id=".$ccUserData[0]['customer_id']; I think i might need to like subtract or add the date var. but im not sure. If someone can help please do. Quote Link to comment https://forums.phpfreaks.com/topic/69966-now-this-problem/ Share on other sites More sharing options...
ccrevcypsys Posted September 19, 2007 Author Share Posted September 19, 2007 i have came up with a little more some thing but i dont know what to put in the middle of the equasion $todays_date = date(Ymd); $old_date= 20070101; $final = $todays_date ?? $old_date; $old_events_query="SELECT * FROM ".$glob['dbprefix']."StreamRush_events WHERE date = ".$final." AND customer_id=".$ccUserData[0]['customer_id']; Quote Link to comment https://forums.phpfreaks.com/topic/69966-now-this-problem/#findComment-351426 Share on other sites More sharing options...
ccrevcypsys Posted September 19, 2007 Author Share Posted September 19, 2007 so this started to work then i added another one and it just put it down in the old the new one i put in was one for 2 days from now. $date = date(Ymd); $query="SELECT * FROM ".$glob['dbprefix']."StreamRush_events WHERE date = ".$date." AND customer_id=".$ccUserData[0]['customer_id']; //old events $old_events_query="SELECT * FROM ".$glob['dbprefix']."StreamRush_events WHERE date != ".$date." AND customer_id=".$ccUserData[0]['customer_id']; Quote Link to comment https://forums.phpfreaks.com/topic/69966-now-this-problem/#findComment-351465 Share on other sites More sharing options...
AdRock Posted September 19, 2007 Share Posted September 19, 2007 You're missing the double quotes before the colon at the end of the sql queries $date = date(Ymd); $query="SELECT * FROM ".$glob['dbprefix'].".StreamRush_events WHERE date = ".$date." AND customer_id=".$ccUserData[0]['customer_id']."; //old events $old_events_query="SELECT * FROM ".$glob['dbprefix'].".StreamRush_events WHERE date != ".$date." AND customer_id=".$ccUserData[0]['customer_id']."; Quote Link to comment https://forums.phpfreaks.com/topic/69966-now-this-problem/#findComment-351476 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.