RE: Query Error

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The errors as it prints are:

The query I just ran was: select * from GCN_items where `item_num` =
'%fm-a294%'
The query I just ran was: Resource id #2
0



-----Original Message-----
From: CPT John W. Holmes [mailto:holmes072000@xxxxxxxxxxx] 
Sent: Tuesday, November 04, 2003 11:04 AM
To: Robert Sossomon; php-db@xxxxxxxxxxxxx
Subject: Re:  Query Error


From: "Robert Sossomon" <robert@xxxxxxxxxxxx>

> And here is the additem.php file where it check for the info in the 
> field and it is erroring out.

It would be rather useful to know the error...

>   $get_iteminfo = "select * from GCN_items where 'item_num' LIKE 
> '%$_POST[sel_item_id]%'";

Take away the single quotes around your column name. You're asking for a
'string' LIKE 'another string' and not comparing anything in your column
at all.

You can use backticks around table and column names, though. Maybe
that's what you're trying to achieve.

$get_iteminfo = "select * from GCN_items where `item_num` LIKE
'%$_POST[sel_item_id]%'";

---John Holmes...

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [PHP Users]     [Postgresql Discussion]     [Kernel Newbies]     [Postgresql]     [Yosemite News]

  Powered by Linux