[thelist] mysql_affected_rows();

Dunstan Orchard dunstan at 1976design.com
Fri Sep 27 17:43:04 CDT 2002


Aloha,

> Actually mysql_query() uses the same connection opened by
> mysql_connect(), which I presume is somewhere else in your code?

oh yes, it's in an include. doh!


> Per that documentation note below about it only returning the # of rows
> *changed* from their original value, I'd say everything is actually working
> properly!

well buggerit.
so how can you differentiate between a record having been updated with
duplicate info, and the insert not having worked at all?

If there's no returned value that indicates if it worked or not then you can't
do error checking?



> And you weren't gettin lucky, I think PHP may have been converting the
> string to an integer rather than integer -> string, since the string only
> contained a numeric value.  My bad on that, didn't think of it that way.

cool, thanks chris :o)


---------------------------
Dorset, England
http://www.1976design.com/
http://www.orchard.it/
http://www.maccaws.org/



More information about the thelist mailing list