mySQL does not directly support arrays.  I'm going to assume that there is a
relationship between entries in each array to entries in the other arrays.
Therefore, create mysql records which reflect that relationship.  Something
like:

CREATE TABLE people (
name varchar(50) NOT NULL default "",
phone char(12) default "000-000-0000",
street1 char(25) default "",
street2 char(25) default "",
city char(25) default "",
state char(2) default "TX",
zip char(10) default "00000-0000"
)

Be advised, the state filed may be silently changed to 4 characters.
Second, I suggest Texas as the default state, because why not go with the
best.  As we say here in Dallas: there are two kinds of people...those who
live in Texas...and those who wish they did.

-----Original Message-----
From: Timothy Potter [mailto:[EMAIL PROTECTED]]
Sent: Thursday, November 08, 2001 8:36 PM
To: [EMAIL PROTECTED]
Subject: [PHP-DB] inserting array into mySQL


I have an array coming from a form that I need to insert into mySQL.

example: name[], phone[], address[]

Please help?



-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]



-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to