Quote:
|
Originally Posted by r937
anyone who writes "An SQL statement!" instead of "A SQL statement!" surely deserves a reply
under which circumstances will you find a row where both username and day_id are empty but message isn't? whose message would it be, and for which day?
perhaps if you would kindly show us the CREATE TABLE statement that you used to create the table?
|
Basically, i wasnt searching the message field because the contents of it are irrelivant. I am running a check as to whether a record is in the database for that username and that day. Example username :gr203 example day_id: 1(monday)
The check is necessary as it determines whether i need to run an insert or update statement. I cannot have two entries in the table for the same username and day hence if both are null then the entry does not already exist so insert the data, else there is already data for that entry so update the specified record.
Thankyou both for your replies so far.