Reply to Re: using a set of arrays togther and keeping data in sync?

Your name:

Reply:


Posted by mantrid on 10/17/06 13:22

<die.spam@hotmail.com> wrote in message
news:1161034055.795389.134370@b28g2000cwb.googlegroups.com...
>
> mantrid wrote:
>
> > Im using arrays generated from my records displayed in a table on my
site to
> > update the corresponding records in a mysql database ie
> >
> > on the web page
> > col1 col2 col3
> > 1 2 2
> > 1 6
> > 2 7 4
> >
> > which I post to next page as col1array col2array col3array problem is
some
> > of the fields in the site's table are blank
> > so the arrays are not in sync
> >
> > ie
> > col1array col2array col3array
> > 1 2 2
> > 1 7 6
> > 2 4
> >
> > so when I loop through the arrays feeding the values into an update sql
the
> > wrong data is going into the wrong rows in the mysql table ie
> >
> > field1 field2 field3
> > row1 1 2 2
> > row2 1 7 6
> > row3 2 4
> >
> > instead of
> >
> > field1 field2 field3
> > row1 1 2 2
> > row2 1 6
> > row3 2 7 4
> >
> > how do I get the data in the arrays to stay in sync, in otherwords how
can
> > I get the arrays to somehow recognise blanks in the site's table
> >
> > Thanks
> > Ian
>
> depends how your doing your loop, cheaters way: (inside your loop)
> if (empty($val)) {$val = "&nbsp;"}
>
> Flamer.
>


Thanks flamer that allowed a goog quick fix.

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация