[SOLVED]create array of letters & numbers to use in DB c
Posted: Tue Jun 08, 2004 1:46 am
DONT MOVE THIS
, I think its realy more to PHP than MySQL
Ok this is the problem,
When I insert certain record in the table/DB (MySQL) autoincrement does the job (my ID column).
But what I want is that not only numbers are inserted in this column but letters.
The only way I see it possible is to declare an array in PHP that contains
all numbers and all small and big letters 0-9 AND a-z AND A-Z
When the form is submitted there will be no autoincrement in the database, because the PHP would generate the first next value and insert it in the prescribed column.
Example (the way I see it):
last record in the table is a34VCa
the next one should be a34VCb
So - how can PHP be told to read the value from the DB, understand this array in this way and to insert "increased" value (by one) in the table.
Can array be inside the script, or called from somewhere elese ??
I dont know HOW to code this, so please the code if possible.
Thanks ahead.
Ok this is the problem,
When I insert certain record in the table/DB (MySQL) autoincrement does the job (my ID column).
But what I want is that not only numbers are inserted in this column but letters.
The only way I see it possible is to declare an array in PHP that contains
all numbers and all small and big letters 0-9 AND a-z AND A-Z
When the form is submitted there will be no autoincrement in the database, because the PHP would generate the first next value and insert it in the prescribed column.
Example (the way I see it):
last record in the table is a34VCa
the next one should be a34VCb
So - how can PHP be told to read the value from the DB, understand this array in this way and to insert "increased" value (by one) in the table.
Can array be inside the script, or called from somewhere elese ??
I dont know HOW to code this, so please the code if possible.
Thanks ahead.