Re: Re: No data?
| From: | tamouse mailing lists | Date: | Fri, 27 Jul 2012 04:01:47 +0000 |
| Subject: | Re: Re: No data? | ||
| References: | 1 2 3 4 5 6 7 8 9 10 11 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-48382@lists.php.net to get a copy of this message | ||
argh
forget that.
simply put the id auto_increment field *last* in the create table
defn, leave everything else as it was.
On Thu, Jul 26, 2012 at 10:38 PM, tamouse mailing lists
<tamouse.lists@gmail.com> wrote:
> With one change to the data file to make the indexing work correctly
> and read all the fields: to accommodate the first id auto_increment
> field, the first value in the csv line must be null:
>
> null.a,b,c,d,e
> null,f,g,h,i,j
> null,k,l,m,n,o
>
> And further, the field count should subsequently be one less in line
> 53 when creating the table:
>
> for ($i=0; $i < (count($fields)-1); $i++) {
>
> and that should do it.
>
> On Thu, Jul 26, 2012 at 10:20 PM, tamouse mailing lists
> <tamouse.lists@gmail.com> wrote:
>> Brad, do take a look at http://pastie.org/4340383
>> It does work.