Jump to content

Help with SQL_BIG_SELECTS=1


dgmuk

Recommended Posts

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!

Link to comment
https://forums.phpfreaks.com/topic/57560-help-with-sql_big_selects1/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.