Re: mysql_affected_rows() question: what was changed?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Not really true, unless I learned programming in a different way ;-)

I mean, if I send an update query, like "update table set field1=$nfield1, field2=$nfield2 ...", I don't know WHICH fields have changed. mysql_affected_rows() only reports how many records were changed. So, if I want to know which fields have changed, I should check it before I send the query? Seems like a lot of work extra...


Cpt John W. Holmes wrote:
Is there a function to show WHAT fields were changed in the records,
instead of only how many records were changed (with

mysql_affected_rows())?


I would like to report to the user which fields were altered, e.g. if he
would change his phone number, to tell him: "phone number changed to

.....".


Ummm... you're creating the SQL, you should know what was updated, right?
There's no function that's going to tell you this, so keep track of it as
you create your query.

---John Holmes...



--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [PHP Users]     [Postgresql Discussion]     [Kernel Newbies]     [Postgresql]     [Yosemite News]

  Powered by Linux