RE: [PHP-DB] Table from an array?

2005-02-02 Thread Bastien Koert
Sure you could, the trick would be indentifiying the column data types, but 
perhaps you could put those in column name definition.

ie user_id int(10), username varchar(50), etc
bastien
From: "Chris Payne" <[EMAIL PROTECTED]>
To: 
Subject: [PHP-DB] Table from an array?
Date: Wed, 2 Feb 2005 16:41:42 -0500
Hi there everyone

Is it possible to create a database table from the first line of a CSV 
file?
What I mean is, how would you create the table columns based on the CSV
file’s columns?  This would really help me out, as some times the table
column counts change on data I have to import, so it would be nice to have 
a
flexible DB structure rather than a static one.


Chris
--
No virus found in this outgoing message.
Checked by AVG Anti-Virus.
Version: 7.0.300 / Virus Database: 265.8.4 - Release Date: 2/1/2005
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP-DB] Table from an array?

2005-02-02 Thread Jason Wong
On Thursday 03 February 2005 05:41, Chris Payne wrote:

> Is it possible to create a database table from the first line of a CSV
> file? What I mean is, how would you create the table columns based on the
> CSV fileâs columns? 

Parse the first line and extract the column names, construct a suitable SQL 
statement to create table?

-- 
Jason Wong -> Gremlins Associates -> www.gremlins.biz
Open Source Software Systems Integrators
* Web Design & Hosting * Internet & Intranet Applications Development *
--
Search the list archives before you post
http://marc.theaimsgroup.com/?l=php-db
--
New Year Resolution: Ignore top posted posts

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php