gwydionwaters Posted December 18, 2008 Share Posted December 18, 2008 hey everyone, i figured out the last problem. my script now works fine if i use "SELECT * FROM Gear" but if i try to use the string i want it say's my argument is invalid, it is SELECT * FROM Gear WHERE Use='$Use' OR Type='$Type' OR Cost='$Cost' OR Rating='$Rating' OR Author='%$Author%' OR Name='%$Name%' Link to comment https://forums.phpfreaks.com/topic/137613-select-string/ Share on other sites More sharing options...
Mchl Posted December 18, 2008 Share Posted December 18, 2008 USE is MySQL's reserved word. You can use it if it is enclosed in ``. Better yet, change column's name to something else. http://dev.mysql.com/doc/refman/5.1/en/reserved-words.html Link to comment https://forums.phpfreaks.com/topic/137613-select-string/#findComment-719296 Share on other sites More sharing options...
gwydionwaters Posted December 18, 2008 Author Share Posted December 18, 2008 sweet, thank you that fixed it. now i have another question if i were to have the same SELECT string with a different column name in use; is there a way to send the form with no values and have all entries returned? as though i had used SELECT * FROM Gear Link to comment https://forums.phpfreaks.com/topic/137613-select-string/#findComment-719308 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.