RE: [PHP] logging of sql queries - success/failed

This is a discussion on RE: [PHP] logging of sql queries - success/failed within the PHP General forums, part of the PHP Programming Forums category; > I've got a script that imports several CSV files via the Load > Data File > command. > &...


Go Back   Usenet Forums > PHP Programming Forums > PHP General

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 06-07-2007
Jim Moseby
 
Posts: n/a
Default RE: [PHP] logging of sql queries - success/failed

> I've got a script that imports several CSV files via the Load
> Data File
> command.
>
> I need to know if each import query was successful or failed.
>
>
>
> Is there a way to log the success/failure of each query including how
> many rows were inserted?
>
>
>



I assum you are using MySQL, since you didn't specify. Typically,
mysql_query() will return false if the query failed, and
mysql_affected_rows() will return the number of rows affected.

JM
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 02:54 AM.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0