I need some help with this. Here is the information from the MySql manual.

IF search_condition THEN statement(s)
[ELSEIF search_condition THEN statement(s)]
...
[ELSE statement(s)]
END IF


IF implements a basic conditional construct. If the search_condition
evaluates to true, the corresponding SQL statement is executed. If no
search_condition matches, the statement in the ELSE clause is executed


Now what I want to do is search to see if a record exists, if it does,
update the record with new information, if not insert the data into the
table.

What confuses me above is that it says that if search condition is true,
then it will execute. How do I do a search and see if it is true? If I do
something like the following and it returns a result, does that mean it is
true?

SELECT * from table WHERE column='data';

Could someone give me a short example of what to do if this is not the case?


Mike Tuller


-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to