List:General Discussion« Previous MessageNext Message »
From:Pooly Date:September 18 2005 10:56pm
Subject:Re: mysql_free_result() WITHOUT mysql_fetch_row()
View as plain text  
2005/9/18, Miguel Cardenas <renito73@stripped>:
> > http://dev.mysql.com/doc/mysql/en/mysql-free-result.html
> > it does not says : you have to retrieve all rows before freing it. So
> > you should be able to free the result. Otherwise it's a bug or
> > undocumented behaviour.
> > But why don't you use the Count(*) solution ?? that's exactly what you
> > need IMHO.
> 
> No, I don't need to know if exists *any* record, I need to know if it exist
> one specific record or set of records, but not to retrieve them, just need to
> know if it/they exist to take a decition on how to insert the following
> ones... if I need only to know if there is data on the table the COUNT(*)
> would be enough...

I'm a bit confused. If you just need to know if there is data matching
a criteria, a count(*) is enough and will do absolutely the same thing
that you want, and spare you the mysql_store_result with a whole
dataset.
count(*) as nothing to do with knowing is there is data in the table or not...
If I'm still wrong, could you provide a sample query ?

-- 
Pooly
Webzine Rock : http://www.w-fenec.org/
Thread
mysql_free_result() WITHOUT mysql_fetch_row()Miguel Cardenas17 Sep
  • Re: mysql_free_result() WITHOUT mysql_fetch_row()Dan Nelson17 Sep
    • Re: mysql_free_result() WITHOUT mysql_fetch_row()Miguel Cardenas18 Sep
      • Re: mysql_free_result() WITHOUT mysql_fetch_row()Pooly18 Sep
        • Re: mysql_free_result() WITHOUT mysql_fetch_row()Miguel Cardenas18 Sep
          • Re: mysql_free_result() WITHOUT mysql_fetch_row()Pooly19 Sep
Re: mysql_free_result() WITHOUT mysql_fetch_row()Pooly19 Sep
  • Re: mysql_free_result() WITHOUT mysql_fetch_row()Miguel Cardenas19 Sep
    • Re: mysql_free_result() WITHOUT mysql_fetch_row()SGreen19 Sep