Reply to Getting Query Failed and not sure why...

Your name:

Reply:


Posted by Sloane T. Irwin on 02/08/07 21:34

Hi,
I'm adding a search functionality to a newly created service request
database. I copied over pretty much all of the code from a previous,
currently working, inventory tracking database that I created. I
changed the field names and whether I wanted "LIKE" or =, but still,
all I get is a query failed message.

Can someone help please!!!

Query code is as follows:

$query = mysql_query("SELECT * FROM support
WHERE (first LIKE '%$searchfor%' OR last LIKE '%$searchfor%' OR
priority LIKE '%$searchfor%' OR inventory='$searchfor' OR owner LIKE '%
$searchfor%' OR building LIKE '%$searchfor%' OR room='$searchfor' OR
email LIKE '%$searchfor%' OR phone LIKE '%$searchfor%' OR issue LIKE '%
$searchfor%' OR c_id LIKE '%$searchfor%')",$db) or die ("Query
failed");
$numofrows = mysql_num_rows($query);

[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

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