Re: mysql_free_result() WITHOUT mysql_fetch_row()

2005-09-19 Thread SGreen
Miguel Cardenas <[EMAIL PROTECTED]> wrote on 09/19/2005 12:13:47 PM: > Hello > > > Have you try : > > select count(*) from mytable where id=x and list=something > > if count ==0, it's like fetchrow==NULL from your solution, but without > > all the fuss about use_result(); > > No, but looks fine,

Re: mysql_free_result() WITHOUT mysql_fetch_row()

2005-09-19 Thread Miguel Cardenas
Hello > Have you try : > select count(*) from mytable where id=x and list=something > if count ==0, it's like fetchrow==NULL from your solution, but without > all the fuss about use_result(); No, but looks fine, I didn't know this usage of count(*) combined with conditions, but now will use it :

Re: mysql_free_result() WITHOUT mysql_fetch_row()

2005-09-19 Thread Pooly
Hi, always reply to the list please 2005/9/19, Miguel Cardenas <[EMAIL PROTECTED]>: > > 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

Re: mysql_free_result() WITHOUT mysql_fetch_row()

2005-09-18 Thread Pooly
2005/9/18, Miguel Cardenas <[EMAIL PROTECTED]>: > > 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

Re: mysql_free_result() WITHOUT mysql_fetch_row()

2005-09-18 Thread Miguel Cardenas
> 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 > ne

Re: mysql_free_result() WITHOUT mysql_fetch_row()

2005-09-18 Thread Pooly
2005/9/17, Miguel Cardenas <[EMAIL PROTECTED]>: > > In the last episode (Sep 17), Miguel Cardenas said: > > > I have a technical doubt, very simple but not mentioned in the manual... > > > > > > What happens if I call mysql_free_result() after performing a query > > > but without doing mysql_fetch_

Re: mysql_free_result() WITHOUT mysql_fetch_row()

2005-09-17 Thread Miguel Cardenas
> In the last episode (Sep 17), Miguel Cardenas said: > > I have a technical doubt, very simple but not mentioned in the manual... > > > > What happens if I call mysql_free_result() after performing a query > > but without doing mysql_fetch_row() ??? > > > > It may sound strange, but just need to k

Re: mysql_free_result() WITHOUT mysql_fetch_row()

2005-09-17 Thread Dan Nelson
In the last episode (Sep 17), Miguel Cardenas said: > I have a technical doubt, very simple but not mentioned in the manual... > > What happens if I call mysql_free_result() after performing a query > but without doing mysql_fetch_row() ??? > > It may sound strange, but just need to know if a dat

mysql_free_result() WITHOUT mysql_fetch_row()

2005-09-17 Thread Miguel Cardenas
Hello list I have a technical doubt, very simple but not mentioned in the manual... What happens if I call mysql_free_result() after performing a query but without doing mysql_fetch_row() ??? It may sound strange, but just need to know if a data row exists more than the data itself... The rig