Reply to Re: Array Select from database

Your name:

Reply:


Posted by "Mark Rees" on 09/28/05 15:40

Array ( [count] => 1 [0] => Array ( [clientaccountmanager] => Array (
[count] => 2 [0] => 210 [1] => 149 )

I've got the following Query="select * from client WHERE
clientaccountmanager='$value of array1' OR '$2nd value of array 1'"
So that the query loops through the whole array...

-----------------------------------------
No indenting for some reason, sorry


You should construct your query like this:

SELECT x FROM y where Z IN (value1,value2,value3)

For looping on arrays, have a look at foreach:

http://uk2.php.net/manual/en/control-structures.foreach.php

Hope this helps

Mark

[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

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