You are here: using simultaneous arrays « PHP Programming Language « IT news, forums, messages
using simultaneous arrays

Posted by Ian Davies on 07/28/06 14:19

I have a table with each column containing the following form objects -
combobox, hidden field, textarea, and tick box. I have created arrays from
each of these columns and now I wish to use the arrays altogether, taking
each array element in order to use in an sql statement
Does anyone know how to use arrays simultaneously
eg
Array1 - 1,2,3
Array2 - text1,text2,text3
Array3 - 31,56,34
Aray4- 1,1,0

used in a loop to populate the following SQLs
SQL="UPDATE mytable SET fieldA=Array2[0], fieldB=Array3[0], fieldC=Array4[0]
WHERE Index=Array1[0]"
SQL="UPDATE mytable SET fieldA=Array2[1], fieldB=Array3[1], fieldC=Array4[1]
WHERE Index=Array1[1]"
etc
for all the elements in the array

Ian

 

Navigation:

[Reply to this 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

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