MYSQL php Select if not exists doesnt work -


When my DB already stores the data, then it should echo "unsuccessfully"

My The code is: (

funny thing It is that if my username should do this then it should do it, no one is putting it. But my echo is not called "unsuccessful", but Why?

Very, very easily: "Insert ignore" does not cause an error - hence your "Unsuccessful" will never happen.

Tip: An alternative "duplicate key may be on the update".

Here is the man page:

Here are more details:



Comments

Popular posts from this blog

c - Mpirun hangs when mpi send and recieve is put in a loop -

python - Apply coupon to a customer's subscription based on non-stripe related actions on the site -

java - Unable to get JDBC connection in Spring application to MySQL -