Re: Any Ideas?
| From: | Geir Pedersen - Activio AS | Date: | Tue, 23 Mar 2004 00:22:19 +0000 |
| Subject: | Re: Any Ideas? | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-181194@lists.php.net to get a copy of this message | ||
Matt,
this is not a direct answer to your question, more a tip on how
you design your database: You should avoid storing the same
information twice. You only risk inconsistencies. In your case
I suggest you compute the textual ID from the primary key value
using the PHP sprintf function whenever you need it, e.g
sprintf ( "CR %03d", $primaryKey ). sprintf is the function to
use for the type of number to text conversion you are looking
for.
---
Geir Pedersen
http://www.activio.com/