Calling all SQL/MySQL gurus!
Just thought I'd post a techy related question here as I'm trying to design some software to manage 'tickets' (for support calls).
I have grasped the basics of using MySQL such as 'INSERT' and 'SELECT FROM' statements, however i seem to be having a problem with the 'UPDATE' statement which is bugging me!
Visual Basic.NET keeps telling me i have an error in the syntax somewhere but everytime i review it i can't seem to see a problem with it. The example statement is as follows: (ID is the unique identifier in this case)
UPDATE ticket SET Client_Name='XYZ' Client_Email='xyz@xyz.com' Client_Telephone='01234567890' Admin_DateComplete='NOW()' WHERE ID='5'
The actual statement is alot longer and includes many more fields, but i have shortened it so that it is easier to understand.
Am i doing the syntax wrong, or is there some other way to update just the 1 record based on ID number?
Many thanks for any surgestions as i'm stumped! :?
SQL Help
Re: SQL Help
You're doing it right Ben, well almost
You just need to comma separate your columns, like this
UPDATE ticket SET Client_Name='XYZ', Client_Email='xyz@xyz.com', Client_Telephone='01234567890', Admin_DateComplete='NOW()' WHERE ID='5'
You just need to comma separate your columns, like this
UPDATE ticket SET Client_Name='XYZ', Client_Email='xyz@xyz.com', Client_Telephone='01234567890', Admin_DateComplete='NOW()' WHERE ID='5'