Wait a minute... This content is very very old. We no longer sell or support this theme version. New Topics
Version 9
Jan Tondera
0 points
Beginner
Hello!
I have discovered that search function with select type field does not work properly with directories larger than 500 listings.
It’s due to this code in class.core.php, lines 642 or so:
[code title=”class.core.php”]
$SQL = “SELECT “.$wpdb->postmeta.”.post_id FROM “.$wpdb->postmeta.”
INNER JOIN “.$wpdb->posts.” ON ( “.$wpdb->postmeta.”.post_id = “.$wpdb->posts.”.ID AND “.$wpdb->posts.”.post_status=’publish’)
WHERE “.$wpdb->postmeta.”.meta_key = (‘”.strip_tags($field).”‘) LIMIT 0,500″;[/code]
So, if you add a 502nd listing with a new value of a searchable field, then this value will not be available in select options.
I have a directory with over 5000 listings, so rising the LIMIT in SQL query is not an option (PHP will run out of memory).
Hello!
I have discovered that search function with select type field does not work properly with directories larger than 500 listings.
It’s due to this code in class.core.php, lines 642 or so:
[code title=”class.core.php”]
$SQL = “SELECT “.$wpdb->postmeta.”.post_id FROM “.$wpdb->postmeta.”
INNER JOIN “.$wpdb->posts.” ON ( “.$wpdb->postmeta.”.post_id = “.$wpdb->posts.”.ID AND “.$wpdb->posts.”.post_status=’publish’)
WHERE “.$wpdb->postmeta.”.meta_key = (‘”.strip_tags($field).”‘) LIMIT 0,500″;[/code]
So, if you add a 502nd listing with a new value of a searchable field, then this value will not be available in select options.
I have a directory with over 5000 listings, so rising the LIMIT in SQL query is not an option (PHP will run out of memory).
Could you please advise how to optimise the code?
Thank you!
Members Only Content
This reply is for PremiumPress customers only.
Login NowMembers Only Content
This reply is for PremiumPress customers only.
Login NowMembers Only Content
This reply is for PremiumPress customers only.
Login Now