|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
mysql, databases and me
okay here's the deal
i am setting up my webpage and i am wanting to keep my links out in a database. i made sure the connection to the database was all working and stuff and now that i have set it up so that you have to use the form to select a category it doesn't work. here's the page: http://www.lunadivina.com/w-d/links.php code is here: http://www.lunadivina.com/w-d/links.txt line 44 is blah blah blah any help is much appreciated oh yeah - the only category that has any links in it is "Actors" |
|
#2
|
|||
|
|||
|
RE: mysql, databases and me
place the database name (as passed to mysql_db_query()) in quotes.
i.e.: |
|
#3
|
|||
|
|||
|
RE: mysql, databases and me
check did that now i get the following error:
Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /home/lunadivi/public_html/w-d/links.php on line 46 line 46 is: i get that error after choosing actors and hitting go |
|
#4
|
|||
|
|||
|
RE: mysql, databases and me
okay i have come to the conclusion that the problem is in the query string.
this is what i have currently if i hard code Actors into the query string it works properly but i want to be able to take the category from the form so what am i doing wrong?? |
|
#5
|
|||
|
|||
|
RE: mysql, databases and me
i imagine the category field is a varchar, right?
if it is, you need to encapsulate the query data in quotes as well. so your PHP/ SQL becomes: or possibly: (note the single quotes inside the double quotes, around the $category variable) |
|
#6
|
|||
|
|||
|
RE: mysql, databases and me
you are fabulous! *HUG* lol it works and i don't know why i didn't think of that! LOL
thank you so much for your help! mucho-appreciated |
|
#7
|
|||
|
|||
|
RE: mysql, databases and me
hey no prob. at least you posted code and weren;t like "okay, im a n00bie, i need a script that does this. thank you for your time" lol
|
![]() |
| Viewing: Codewalkers Forums > Other Technologies > Database Help > mysql, databases and me |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|