I am trying to update/insert a record into the table depending on whether it
exists in the table or not.
Something along the lines of...
IF (SELECT id FROM myable WHERE id="myid")
INSERT INTO mytable(id,name) VALUES ("myid", "myname")
ELSE
UPDATE mytable SET name="mynewname" WHERE id = "myid";
Obviously this does not work, but shows what I am trying to achieve in one
statement.
Is this possible?
If so any chance of some example code.
Rob
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]