Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Advance filtering with Dreamweaver cs4, PHP and mysql

New Here ,
Sep 04, 2009 Sep 04, 2009

Here is the problem:

This is my query which gives me back no data.

SELECT *
FROM photos
WHERE photoTypeID LIKE cat
ORDER BY photoID DESC

variable = cat

Type = integer

default value= -1

run time value = $_POST['cat']

If I change the default value to "%" I get all the data in the Test SQL statement window but then I get a DIVISION BY ZERO on my page.

TOPICS
Server side applications
496
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Sep 05, 2009 Sep 05, 2009
LATEST

When using LIKE, you must set the type to "Text". LIKE matches strings. It cannot be used with numbers.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines