I am a relatively inexperienced programmer(hobbiest).
I need to do check for the existence of a student in a table.  If he is
there, get is id#, if not, insert him and get his id#.  Id# is a primary
key auto_increment field.

So, say this is my sql select...
        SELECT id from students where name='$name';

and that $name has a correct value in it.

What would be the best way to do the select/insert-select for this?

-- 
______________________________________________________
|                                                     |
| Mike Knichel               Math Teacher             |
| [EMAIL PROTECTED]    Computer Science Teacher |
| 518-622-0490 x614          Apple Service Provider   |
|_____________________________________________________|


Reply via email to