Reply to Re: A query from $_POST using foreach

Your name:

Reply:


Posted by Steve on 11/08/06 18:18

"ZeldorBlat" <zeldorblat@gmail.com> wrote in message
news:1163008175.317828.154700@h48g2000cwc.googlegroups.com...
|
| Steve wrote:
| > | $query .= explode(" AND ", $_POST);
| > |
| > | easy as that, however i assume given the lack of FIELD = VALUE in your
| > | example, that you are building a list. in that case, it is more
efficient
| > to
| > | do:
| > |
| > | $query .= "WHERE someField IN ('" . explode("', '", $_POST) . "')";
| >
| > ooops. correction (not to be confused with bickering, esp. with self ;^)
| >
| > either:
| >
| > $query .= explode(" AND ", array_values($_POST));
| >
| > or:
| >
| > $query .= "WHERE someField IN ('" . explode("', '",
array_values($_POST)) .
| > "')";
|
| Wrong direction. Use implode in this case, not explode.

lol. my mind is shot. i'm working on something else a bit more complex and
came here to mentally cool off. i guess it's showing now.

;^)

[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

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