all groups > macromedia flash flash remoting > january 2005 >
You're in the

macromedia flash flash remoting

group:

Problem with Flash,PHP,MySql simple multiple query!


Problem with Flash,PHP,MySql simple multiple query! mdalene
1/14/2005 1:29:26 PM
macromedia flash flash remoting: My query goes like this:

SELECT * FROM database WHERE table1 LIKE '%$ingr%' OR table2 LIKE '%$ingr%'

Re: Problem with Flash,PHP,MySql simple multiple query! bzctoons
1/15/2005 4:18:34 PM
mdalene a =E9crit :
[quoted text, click to view]
mhh...
I think :

SELECT * FROM table WHERE field1 LIKE '%$ingr%' OR field2 LIKE '%$ingr%'
Re: Problem with Flash,PHP,MySql simple multiple query! Ianm
1/18/2005 4:49:47 PM
Try protecting your variables.....

$ingr is probably being matched!!

therefore try this:

"SELECT * FROM table WHERE field1 LIKE '%" . $ingr . "%' OR field2 LIKE
'%".$ingr."%'";

------ actual code (which assumes you've already connected to the DB)

$sql = "SELECT * FROM table WHERE ";
$sql .= "field1 like '%".$ingr."%' or ";
$sql .= "field2 like '%".$ingr."%'";

$result = mysql_query($sql, $dbcnx);
while ($row = mysql_fetch_row($result)) {
etc...........
Re: Problem with Flash,PHP,MySql simple multiple query! daniele
1/26/2005 1:46:13 PM
Are you sure the SQL syntax is right ?

it's should be
SELECT * FROM tableNameWHERE fieldName1 LIKE '%$ingr%' OR fieldName2 LIKE '%$ingr%'

Have a nice day
--
dott. daniele galiffa
multimedia designer & developer
Macromedia Flash MX Developer Certified
daniele@mentegrafica.it
"mdalene" <webforumsuser@macromedia.com> ha scritto nel messaggio news:cs8hfl$gn8$1@forums.macromedia.com...
[quoted text, click to view]

AddThis Social Bookmark Button