Impossible to help you without more background of the problem, and specific details of what you have tried etc.
ok, I have this sentence in my template:
$wpdb->get_results(“SELECT * FROM h_hotels WHERE CountryFileName=’italy’ GROUP BY CityName “);
this query return 2000 rows, so the wordpress template crashed and I get a white screen
but if the query only return a few rows dont have any problem
please I need help
I think you should consider to use LIMIT and pagination.
And white screen may occur because of low memory available to WP.
You may try to add to your wp-config.php something like:
define('WP_MEMORY_LIMIT', '128M');
I need to show all the rows in the page, I will try adding
define(‘WP_MEMORY_LIMIT’, ‘128M’);
to my wp-config.php
How many column fields are in the h_hotels table? Do you need to return every column? Your current query is returning every single column (SELECT * FROM h_hotels) so that combined with 2000 rows is causing you problems.
For the initial list of returned queries could you not just return (and display) the bare minimum information then show all the columns you need if someone clicks on a hotel for more information (i.e. do you need all hotel column information on the whole list of 2000 hotels).
Does that make sense?