mardi 5 mars 2019

db2 database couldn't check if username already exists

I am creating a simple registration page using ibm db2 and php, all my data is being saved in db2 database, but I can't keep the constraint of already existing username. It is registering the user even if the username is already there in db2. also it is logging in with any password entered!

i couldn't understand when the entries are shown in database it means the data has found the right connection to db. then why it is not catching the constraints logic.

Also I am new to db2, I just changed the mysql functions in db2 for php. there are some functions which are giving me error vibes. db2_exec(), and db2_fetch_assoc and kindly let me know if there is any proper usage of mysqli_escape_string in db2!

code snippet

TIA




Aucun commentaire:

Enregistrer un commentaire