embedded links encoded
Posted: Fri Aug 01, 2008 1:11 pm
First, i am a newb so please forgive all the newb mistakes, and thanks in advance for any help.
I'm just trying to build a fairly simple database. I have a quicksearch function that searches all fields with a LIKE %keyword% query. The result is sent to a template for output. To be able to sort the results, i embedded a link to each Column header in the template that includes the original query and a sort field. It actually works most of the time but i've discovered that whenever a search word that starts with "ad" or "ed", the embedded links get all messed up.
examples:
if i quicksearch "propofol", the column header will have an embedded link as follows:
http://.../sort.php?sql=SELECT * FROM patent WHERE title LIKE '%propofol%' OR inventor LIKE '%propofol%' OR...&sort=title
if i search for a word that starts with ed or ad, the link becomes:
http://.../sort.php?sql=SELECT%20*%20FROM%20patent%20WHERE%20title%20LIKE%20%27%edetate%%27%20OR%20inventor%20LIKE%20%27%edetate%%27%20OR...sort=assignee
I know that the characters are being translated to code but i'm just a little stuck as to why it only does it some of the time.
TIA
I'm just trying to build a fairly simple database. I have a quicksearch function that searches all fields with a LIKE %keyword% query. The result is sent to a template for output. To be able to sort the results, i embedded a link to each Column header in the template that includes the original query and a sort field. It actually works most of the time but i've discovered that whenever a search word that starts with "ad" or "ed", the embedded links get all messed up.
examples:
if i quicksearch "propofol", the column header will have an embedded link as follows:
http://.../sort.php?sql=SELECT * FROM patent WHERE title LIKE '%propofol%' OR inventor LIKE '%propofol%' OR...&sort=title
if i search for a word that starts with ed or ad, the link becomes:
http://.../sort.php?sql=SELECT%20*%20FROM%20patent%20WHERE%20title%20LIKE%20%27%edetate%%27%20OR%20inventor%20LIKE%20%27%edetate%%27%20OR...sort=assignee
I know that the characters are being translated to code but i'm just a little stuck as to why it only does it some of the time.
TIA