Can someone tell me what is wrong with this code:
code:
mysql_query("update referals2 set amount=(amount+1) where website='$referal'") or die (mysql_query("insert into referals2 values('','$referal','')"));
It is simple really, update the feild, but if there is no feild to update add a new one. However, never using the die function before is it designed to echo text or act as an else statement for mysql queries? Thanks
If you can also give me some right code or a better funtion to use when it comes to mysql queries, that would be great as well.