I need an example of a stored procedure that uses an IF statement.
What I need is count how many rows are in a table that contain Products. If there aren't any rows that contain Products use LAST_INSERT_ID().
I've Googled til Im blue in the face looking for an example but can't find one. Just trying to learn MySQL on my own and I think I am really confused. Any help would be appreciated. Thanks in advance. If you need more info PM me or post here. :dunno