guestabc Posted December 12, 2008 Share Posted December 12, 2008 hi i currently have the query below $sSQL= "SELECT * FROM qryRes WHERE sUser='$sTipsID' AND sWonLost='Won' OR sUser='$sTipsID' AND sWonLost='Placed' ORDER BY sDate DESC ;"; this selects all the results from my database for that user. however I am starting to get to many results to show on one page. so i am trying to page the results by week. i have searched google for this but not really found anything i understand. any help would be appreciated Link to comment https://forums.phpfreaks.com/topic/136689-solved-selectand-page-results-by-the-date-week/ Share on other sites More sharing options...
rhodesa Posted December 12, 2008 Share Posted December 12, 2008 http://www.phpfreaks.com/tutorial/basic-pagination Link to comment https://forums.phpfreaks.com/topic/136689-solved-selectand-page-results-by-the-date-week/#findComment-713761 Share on other sites More sharing options...
guestabc Posted December 14, 2008 Author Share Posted December 14, 2008 hi i am trying the tutorial link that you sent me however I am having a problem with the mysql_fetch_row() function as i'm using a MS Access database. is there an alternative function i can use? thanks $sql = "SELECT COUNT(*) FROM Results "; $result = $adoConnection->Execute( $sql ); $r = mysql_fetch_row($result); $numrows = $r[0]; Link to comment https://forums.phpfreaks.com/topic/136689-solved-selectand-page-results-by-the-date-week/#findComment-714889 Share on other sites More sharing options...
guestabc Posted December 14, 2008 Author Share Posted December 14, 2008 I have solved the problem above but i now get an error in my next query. Any ideas? thanks the error: Fatal error: Uncaught exception 'com_exception' with message '<b>Source:</b> Microsoft JET Database Engine<br/><b>Description:</b> Syntax error (missing operator) in query expression my sql statement: $sql = "SELECT * FROM Results WHERE sUser='$sTID' AND sWon='Won' OR sUser='$sTID' AND sWon='Placed' LIMIT $offset, $rowsperpage"; Link to comment https://forums.phpfreaks.com/topic/136689-solved-selectand-page-results-by-the-date-week/#findComment-714904 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.