guestabc Posted December 14, 2008 Share Posted December 14, 2008 I currently have the query shown below $sSQL= "SELECT * FROM Results WHERE sUsername='$sTipsterID' AND sWonLost='Won' OR sUsername='$sTipsterID' AND sWonLost='Placed' sDate1 between date_sub(curdate(),INTERVAL 7 DAY) and curdate(ORDER BY sDate1 DESC ;"; however i'm getting the following error message Fatal error: Uncaught exception 'com_exception' with message '<b>Source:</b> Unknown<br/><b>Description:</b> Unknown' in E:\path\to\tipsterdetails.php:142 Stack trace: #0 E:\path\to\tipsterdetails.php(142): com->Execute('SELECT * FROM q...') #1 {main} thrown in E:\path\to\tipsterdetails.php on line 142 Link to comment https://forums.phpfreaks.com/topic/136954-select-results-from-past-7-days/ Share on other sites More sharing options...
Mark Baker Posted December 14, 2008 Share Posted December 14, 2008 Try looking at your SQL query SELECT * FROM Results WHERE (sUsername='$sTipsterID' AND sWonLost='Won') OR (sUsername='$sTipsterID' AND sWonLost='Placed') AND sDate1 between date_sub(curdate(),INTERVAL 7 DAY) and curdate() ORDER BY sDate1 DESC Link to comment https://forums.phpfreaks.com/topic/136954-select-results-from-past-7-days/#findComment-715273 Share on other sites More sharing options...
guestabc Posted December 14, 2008 Author Share Posted December 14, 2008 i have implemented the changes and now get the following error: Parse error: syntax error, unexpected T_STRING in E:\path\to\tipsterdetails.php on line 141 Link to comment https://forums.phpfreaks.com/topic/136954-select-results-from-past-7-days/#findComment-715300 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.