RE: Feature Request: UPDATE 'error codes' or mysql_affected_rows() to be more "accurate"

2004-05-31 Thread Robert A. Rosenberg
At 12:38 -0700 on 05/27/2004, Daevid Vincent wrote about Re: Feature Request: UPDATE 'error codes' or mysql_affected: REPLACE INTO won't work, as I need the previous record (hence the update). I store the first and last time I saw a node, amongst other info. REPLACE would delete that data. REPLAC

Re: Feature Request: UPDATE 'error codes' or mysql_affected_rows() to be more "accurate"

2004-05-31 Thread Sasha Pachev
Daevid Vincent wrote: Well, my "hack" (which is sort of like what you suggest) is to change my primary key from just an auto_increment 'id' field to a combination of two other fields (mac/scanner_id) that I know must be unique. Then I rely upon the fact that mySQL will not allow a duplicate PK. (I

RE: Feature Request: UPDATE 'error codes' or mysql_affected_rows() to be more "accurate"

2004-05-27 Thread Daevid Vincent
PLACE would delete that data. http://daevid.com > -Original Message- > From: Steve Meyers [mailto:[EMAIL PROTECTED] > Sent: Thursday, May 27, 2004 7:42 AM > To: Daevid Vincent > Cc: [EMAIL PROTECTED] > Subject: Re: Feature Request: UPDATE 'error codes' or > mysql_a

Re: Feature Request: UPDATE 'error codes' or mysql_affected_rows() to be more "accurate"

2004-05-27 Thread Steve Meyers
1" and if mysql_affected_rows == 0, then I know nothing was updated and so I do an INSERT. I find this is much cleaner and the majority of the time, I'm going to do UPDATES, so I didn't want to waste a SELECT (even though I hear they're "cheap"). I'm doing these qu

Re: Feature Request: UPDATE 'error codes' or mysql_affected_rows() to be more "accurate"

2004-05-26 Thread Robert J Taylor
|INSERT| Syntax <http://dev.mysql.com/doc/mysql/en/INSERT.html>. http://dev.mysql.com/doc/mysql/en/REPLACE.html HTH, Robert J Taylor [EMAIL PROTECTED] Daevid Vincent wrote: I'm developing a program where I try an "UPDATE ... LIMIT 1" and if mysql_affected_rows == 0, then I kno

Feature Request: UPDATE 'error codes' or mysql_affected_rows() to be more "accurate"

2004-05-26 Thread Daevid Vincent
I'm developing a program where I try an "UPDATE ... LIMIT 1" and if mysql_affected_rows == 0, then I know nothing was updated and so I do an INSERT. I find this is much cleaner and the majority of the time, I'm going to do UPDATES, so I didn't want to waste a SELECT (e

Re: mysql_affected_rows()

2002-05-12 Thread Paul DuBois
At 12:15 +0200 5/12/02, Inbal Ovadia wrote: >Hi >I build a batch file that run a few sql queries. >I want to know the results (how many rows affected) >but it doesn't recognize the method mysql_affected_rows. >What should i use to get the results? >Thanks mysql_affected_

mysql_affected_rows()

2002-05-12 Thread Inbal Ovadia
Hi I build a batch file that run a few sql queries. I want to know the results (how many rows affected) but it doesn't recognize the method mysql_affected_rows. What should i use to get the results? Thanks - Before po

Re: about Mysql_affected_rows

2001-11-15 Thread M
, although working fine on Win. Anyway, after correcting this problem, I noticed that Mysql_Affected_Rows() works fine for SELECT also, retrieving correct number found rows , ( even manual indicating to be applied for UPDATE,INSERT,DELETE) , whenever Mysql_Num_Rows($set) returns always = 0. I don&#

Re: about Mysql_affected_rows

2001-11-14 Thread Paul DuBois
At 1:50 AM -0200 11/15/01, M wrote: >Hello, I work PHP environment. I use to call Mysql_Affected_Rows to get >number of records retrieved by SELECT commands. >This works fine for some scripts, but now I got a script which returns >qtty records = -1, even I know these records exist

Re: about Mysql_affected_rows

2001-11-14 Thread John Steele
Miguel, What you want is mysql_num_rows() after a SELECT call. John >Hello, I work PHP environment. I use to call Mysql_Affected_Rows to get >number of records retrieved by SELECT commands. >This works fine for some scripts, but now I got a script which returns >qtty records

about Mysql_affected_rows

2001-11-14 Thread M
Hello, I work PHP environment. I use to call Mysql_Affected_Rows to get number of records retrieved by SELECT commands. This works fine for some scripts, but now I got a script which returns qtty records = -1, even I know these records exists. I review Mysql manual and notice this function just