|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
AT&T devCentral & BlackBerry(r) Webcast Series: BlackBerry and GPS -Build Location Awareness into your BlackBerry Applications, July 10th-1:00PM EST. Register Today!
|
|
#1
|
|||
|
|||
|
Help with a query
I am entering data into a table via an html form. I distinguish the information by name but the problem is that names that include "&" don't seem to be working right.
example: $result = mysql_query("SELECT * FROM event WHERE cname='$cname'"); however if $cname="blah & blah" for instance.. it doesnt work. i want to be able to pull the info without assigning ID numbers. any suggestions? thanks! |
|
#2
|
|||
|
|||
|
RE: Help with a query
Is it possible that the & is being turned into & before going into the database? Use a tool such as phpmyadmin to see what is actually in the database....
|
|
#3
|
|||
|
|||
|
RE: Help with a query
ok thanks for such a quick response! i checked out the database and what was being entered was accurate. i did find the problem though.
i am sending the name "blah & blah" through the url but what is actually being sent is "cname=blah%20&%20blah". when i echoed $cname all i got was "blah" so my query statement would be messed up if i used $cname. so... is there any way to send an ampersand through the URL and preserve the original syntax so my query will work?? |
![]() |
| Viewing: Codewalkers Forums > Other Technologies > Database Help > Help with a query |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|
|
|