Re: db query not working

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

 



Satyam wrote:
I saw two people pointing two errors on the SQL insert statement which you would have found yourself had you put the 'or die()' at the end of the query, as someone else suggested. Do never leave any query without the 'or die()' after it (or any other means to check if mysql_query returns anything not false). This would have saved lots of your time, our time, everybody's bandwidth and would avoid your asking everybody again for the next error you make. We all make errors, none of us is above that, that's why, at least in my case, I never fail to add the or die() at the end. That's why the developers of function libraries have put some means of reporting errors back. It takes time for providing good error reporting. You are wasting that effort as well.

Do you deserve all this speech? No more than the dozens who write what I call 'ballistic' code: code you have no control over once it launches. Guided missiles are far better. Anyway, you got it because I had time to rant about this.

Satyam

I wasted no more bandwidth than you did with your rant. My code post was edited from the original code and that's where the mistake was made, not in the code itself. And I do, by the way, end all my queries with or die(). I just left it out of the edit. Besides, the problem is fixed now. Thanks to all that helped.

Ed

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


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux