View Single Post
Old 02-27-2008, 12:01 AM   #3 (permalink)
xenon
The Frequenter
Newcomer 
 
xenon's Avatar
 
Join Date: Dec 2007
Location: Bucharest, Romania
Posts: 438
Thanks: 3
xenon is on a distinguished road
Default

mysql_query returns a resource on success, and false in case of a failure. It doesn't return 1 in any circumstance. Also, watch out. You're executing the same query twice:

Code:
//execcute a query on a MySQL database 
    mysql_query($query); // first time
     
    //Message 
    if (mysql_query($query) == 1 ) { // and here you go again
, the result being 2 identical rows inserted into the database.
__________________
I have optimistic thoughts, even though sometimes (if not always) life's a bitch.
xenon is offline  
Reply With Quote
The Following User Says Thank You to xenon For This Useful Post:
StevenF (02-27-2008)