Re: mySQL query question
| From: | Martijn Korse | Date: | Fri, 14 Nov 2008 14:28:00 +0000 |
| Subject: | Re: mySQL query question | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-283298@lists.php.net to get a copy of this message | ||
I would create a separate table for this (confirmation_numbers or something)
with an autoincrement primary key. That way you can simply insert a new
record for you contact and then ask (using mysql_insert_id()) what the
confirmation number is.
This approach is much safer as you can be 100% sure the number is unique and
it's much less complicated. (of course you still need to check if the query
didn't fail)
-----
http://devshed.excudo.net http://devshed.excudo.net
--
View this message in context: http://www.nabble.com/mySQL-query-question-tp20495466p20501473.html
Sent from the PHP - General mailing list archive at Nabble.com.