Levi Smith wrote:
But I need something like:
. " WHERE item_categories.item_category = '$_GET[cat]' AND
'item.vendor_id .
"-" . item.refer_id . "-" . item.short_item_id' =
item_categories.long_item_id");
Which does NOT work...
Looks like you might have some quoting errors. Also, I'm not sure how
to do string concatenation in mysql, but a quick google shows the
CONCAT()[1] function. So it might be something like
" WHERE item_categories.item_category = '$_GET[cat]' and
CONCAT(item.vendor_id, '-', item.refer_id, '-', item.short_item_id) =
item_categories.long_item_id"
Also be aware that putting things directly from the request parameter
into a sql string is a sql injection flaw.
-- Rick
[1]: http://dev.mysql.com/doc/refman/5.0/en/string-functions.html
--
[email protected]
http://www.kernel-panic.org/cgi-bin/mailman/listinfo/kplug-list