I would like to know how to have a php script loop through two different sql statements and use one according to a yes or no answer. I am still kinda new to php and I already have my sql statements, but I dont know how to use php to tell it to use one of the other. My sql statements are as follows...
$sql = "INSERT INTO $table_name (our_serv) VALUES (\"$our_serv\") "; $sql = "UPDATE $table_name SET our_serv=\"$our_serv\""; How can I get it to pick one of these... for instance if there is no entry in the unique table to enter one using the first sql statement, or if there is already an entry to simply update and overwrite the current table entry. Any help would be appriciated and if you could please document it so I understand and dont have to ask again. Thanks, jas WOW, your neat.... -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php