Forum Moderators: coopster

Message Too Old, No Replies

Cannot retrieve database entry when digits are part of the link

         

JayDev

12:50 am on Jul 23, 2007 (gmt 0)

10+ Year Member



I have been trying to figure out why a link such as:

/my-link-1234-test.html

is not picking up the database entry, which is "my-link-1234-test"

BUT when the database entry is

my-link-one-two-three-four-test.html

the entry is found without any problem when clicking on the link. The issue is related to the digits since when the link does NOT include digits, it all works fine.

I wonder if the issue comes from my php SQL filter, which looks like this:

SELECT * FROM article_content WHERE articletitle LIKE '%%%s%%'

I have tried to edit the "%" characters in many ways but still no luck.

Any help would be appreciated since I cannot figure this out.

[edited by: JayDev at 12:50 am (utc) on July 23, 2007]

phparion

9:26 am on Jul 23, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



are you using mod rewrite? if yes then print your query before executing it and check its actual shape, that might give you some clue...