Reply to Re: newbie wanting advice on search form

Your name:

Reply:


Posted by Jerry Stuckle on 12/07/49 11:27

wgerry wrote:
>
> //$query = 'SELECT * FROM `arrow` WHERE `Surname`LIKE \"%trimmed%\" ;
>

In addition to the other comments, this should be:

$query = "SELECT * FROM arrow WHERE Surname LIKE '%$trimmed%'" ;

The `s around the table and column name are unnecessary unless you have
a conflict with a reserved word. They don't hurt, they're just not
necessary.

However - you need single quotes around the LIKE value - and it should
be $trimmed - you forgot the '$'. Additionally, to get $trimmed to
expand, you need the whole thing in double quotes, not single (or
concatenate the strings together).

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@attglobal.net
==================

[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

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