Ok here is the code chunk:
 
    $rows = is_numeric($_GET['rows']) ? $_GET['rows'] : 5;
    $stRow = 0;
    
    // SEARCH CODE
    $sql = "SELECT SQL_CALC_FOUND_ROWS propertyData.*,
propertyDataBulk.propertyDesc FROM propertyData LEFT JOIN propertyDataBulk
ON propertyData.id = propertyDataBulk.propertyID WHERE state = '$state'
limit $stRow, $rows";
    $search = mysql_query($sql);
    echo $sql;
    
    $sql = "SELECT FOUND_ROWS()";
    $ctTotalResults = mysql_fetch_row(mysql_query($sql));
 
It errors out on the first $search = mysql_query(); statement.
 

Matt Babineau 
Criticalcode 
w: http://www.criticalcode.com <http://www.criticalcode.com/>  
p: 858.733.0160 
e: [EMAIL PROTECTED] 

 

  _____  

From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, February 01, 2005 12:25 PM
To: Matt Babineau
Cc: 'MySQL General'
Subject: Re: Problem with SELECT SQL_CALC_FOUND_ROWS




"Matt Babineau" <[EMAIL PROTECTED]> wrote on 02/01/2005 03:20:49 PM:

> Hi All-
> 
> I'm running a query that uses SQL_CALC_FOUND_ROWS for my search engine on
a
> real estate site. The problem is that I get an error when I run my query:
> 
> "Warning mysql_query(): Unable to save result set in /clients/search.php"
> 
> My Query is:
> 
> SELECT SQL_CALC_FOUND_ROWS propertyData.*, propertyDataBulk.propertyDesc
> FROM propertyData LEFT JOIN propertyDataBulk ON propertyData.id =
> propertyDataBulk.propertyID WHERE state = 'CA' limit 0, 5
> 
> Very odd that this happens, I am running MySQL 4.1.9
> 
> Thanks,
> 
> Matt Babineau
> Criticalcode
> w: http://www.criticalcode.com
> p: 858.733.0160
> e: [EMAIL PROTECTED]
> 

I am by not a PHP expert but it seems that your error message is coming from
PHP and not from MySQL (based on the name of the function in the message).
Please post the code that surrounds this statement and try to determine and
indicate which line is throwing the error, please. 

Shawn Green
Database Administrator
Unimin Corporation - Spruce Pine 


Reply via email to