query checking

Questions about the MySQL, PostgreSQL, and most other databases, as well as using it with PHP can be asked here.

Moderator: General Moderators

Post Reply
the
Forum Newbie
Posts: 3
Joined: Wed Mar 05, 2003 5:00 pm
Location: ca

query checking

Post by the »

Is there a way to check if INSERT or UPDATE query was done.

Having a problem with a shoppingcart where only sometimes it doesn't update or iunsert the db with the customer and orders infos but I get the email confirmation with the right infos.
All the query are done on the same page at the top and mail() at the bottom.

Any idea.

Thanks
hedge
Forum Contributor
Posts: 234
Joined: Fri Aug 30, 2002 10:19 am
Location: Calgary, AB, Canada

Re: query checking

Post by hedge »

the wrote:Is there a way to check if INSERT or UPDATE query was done.

Having a problem with a shoppingcart where only sometimes it doesn't update or iunsert the db with the customer and orders infos but I get the email confirmation with the right infos.
All the query are done on the same page at the top and mail() at the bottom.

Any idea.

Thanks
what DB? some have auditing that you can use to track things like that.
the
Forum Newbie
Posts: 3
Joined: Wed Mar 05, 2003 5:00 pm
Location: ca

Post by the »

The db is mysql
hedge
Forum Contributor
Posts: 234
Joined: Fri Aug 30, 2002 10:19 am
Location: Calgary, AB, Canada

Post by hedge »

Sorry, I can't help then. My skills are more with Oracle.. There are a lot of MySQL experts here though, someone should know.
User avatar
twigletmac
Her Royal Site Adminness
Posts: 5371
Joined: Tue Apr 23, 2002 2:21 am
Location: Essex, UK

Post by twigletmac »

the wrote:Is there a way to check if INSERT or UPDATE query was done.
Try mysql_affected_rows().

Mac
Post Reply