You are here: Re: Connecting to mysql with php « PHP Programming Language « IT news, forums, messages
Re: Connecting to mysql with php

Posted by Dave Mennenoh on 02/14/06 18:44

>>$query = select * from books where ".$searchtype." like
>>'%".$searchterm."%'" ;

Besides missing the leading quotation mark, you might like to know that you
don't need to do concatenation like this using PHP - so you can simply do
this:

$query = select * from books where $searchtype like '%$searchterm%'" ;

weird huh!

--
Dave -
www.blurredistinction.com
www.macromedia.com/support/forums/team_macromedia/

 

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

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