dbquery("insert into ".DB_MYTABLE."(unival,val2,val3)values('test','test','test')");
if(!dbquery(...)){
echo "unival already exists";
}
try{
dbquery(...);
}catch(Exception $e){
if(stripos($e->getMessage(),"Duplicate")){
echo "unival already exists";
}
}
<?php
if (dbcount("(*)", DB_MYTABLE, "unival='test' AND val2='test' AND val3='test'") == 0) {
dbquery("INSERT INTO ".DB_MYTABLE."(unival,val2,val3) VALUES ('test','test','test')");
} else {
echo "unival already exist";
}
?>
Category Forum
Panels and InfusionsLabels
None yet
Statistics
2 participants
Notifications
You are not receiving notifications from this thread.
Related Questions