dgmuk Posted June 28, 2007 Share Posted June 28, 2007 Hi, I'm having a problem with mysql database in that I need to SET SQL_BIG_SELECTS=1 but I have no idea how to do it! This is the script I am using: mysql_connect("localhost", "DATABASENAME", "PASSWORD") or die(mysql_error()); mysql_select_db("DATABASENAME") or die(mysql_error()); $result = mysql_query("SELECT * FROM table") or die(mysql_error()); echo "<table border='1'>"; echo "<tr> <th>Name</th> <th>Age</th> </tr>"; // keeps getting the next row until there are no more to get while($row = mysql_fetch_array( $result )) { // Print out the contents of each row into a table echo "<tr><td>"; echo $row['id']; echo "</td><td>"; echo $row['name']; echo "</td></tr>"; } echo "</table>"; When I run the script I get the error: The SELECT would examine more than MAX_JOIN_SIZE rows; check your WHERE and use SET SQL_BIG_SELECTS=1 or SET SQL_MAX_JOIN_SIZE=# if the SELECT is okay Can anyone help please as I have searched everywhere and I can't find the answer! ??? Thanks very much! Quote Link to comment Share on other sites More sharing options...
trq Posted June 28, 2007 Share Posted June 28, 2007 table is a reserved word. Try making your query.... "SELECT * FROM `table`" Quote Link to comment Share on other sites More sharing options...
per1os Posted June 28, 2007 Share Posted June 28, 2007 mysql_connect("localhost", "USERNAME", "PASSWORD") or die(mysql_error()); mysql_select_db("DATABASENAME") or die(mysql_error()); www.php.net/mysql_connect host, username, password. The database gets designated in the select_db portion. Quote Link to comment Share on other sites More sharing options...
dgmuk Posted June 28, 2007 Author Share Posted June 28, 2007 Hi guys, Thanks for the info... i should have mentioned that I changed the databasename, password and table name to say databasename, password and table just for example on the forum! Any ideas about how to SET SQL_BIG_SELECTS=1? Thanks again! Quote Link to comment 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.