Page 2 of 2
Posted: Tue Feb 24, 2004 12:13 pm
by Illusionist
hmm...
1) are you sure there is an ID field in your database?
2) after setting $query, echo it back out and make sure it is ok
3) i dunno...
Posted: Tue Feb 24, 2004 12:16 pm
by mikegotnaild
Im positive there is an ID field.
Posted: Tue Feb 24, 2004 3:52 pm
by Illusionist
did you try the second suggestion??
Posted: Tue Feb 24, 2004 4:02 pm
by mikegotnaild
you mean echo "Query: $query"; ? I did that and this is the output
"Query: SELECT * FROM Acoustic WHERE ID=
Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /www/n/naild/htdocs/localmm/modules/Bands_Showcase/page2.php on line 18"
Posted: Tue Feb 24, 2004 4:55 pm
by Illusionist
ahh OK! so our SELECT statement is wrong... Are you just viewing this page normally from a browser, or are you clicking on taht link that actually tells waht the band ID is?
Posted: Tue Feb 24, 2004 5:07 pm
by mikegotnaild
go here.
http://naild.com/localmm Click on Bands showcase than go to Acoustic.. Thats the page im lookin at. Its acoustic.php. Its the first page. Ok in the select statement i put ' ' around like this . SELECT * FROM Acoustic WHERE ID='$id'"; and the error went away. but there isnt no query results.. just my $query echo But when i echo the $query it shows this "Query: SELECT * FROM Acoustic WHERE ID='' " $id isnt putting out anything. I have a question though.. what is 'band' in this $id = $_GET['band'];? I am very lost now.
Posted: Wed Feb 25, 2004 11:13 am
by Illusionist
OK, well i went there but the links to get ot the individual pages are missing. And band there is how you were passing the ID through the URL.... something.php?band=$id