Hi there,
I'm in the process of working on a page numbering system. A small problem I've come across is as follows:
// Retrieve the product listings from the database
$sql_query = "SELECT id, name, url, image, description, price, currency, category, extradetails FROM products WHERE MATCH(name,description) AGAINST('".$searchterm."') LIMIT ".$page_start_end;
$sql_result = mysql_query($sql_query) or die(mysql_error());
$sql_numrow = mysql_num_rows($sql_result);
The problem is that the LIMIT is determined by the php script, and of course, when the results are limited, numrows only shows the total results. What I need is the total number of results for the query, not for the results returned as the results returned are limited to the amount I set (10 in this case).
Second problem - full text searches. Not sure I can create one as:
'full text'
doesnt appear to be fulltext search. Instead you need:
"full text"
Is there a way round this as all my present queries are:
$sql_query = "SELECT WHERE MATCH() AGAINST('\"full text\"')";
Thanks in advance,
Chris Evans