Johan Beijar Posted April 8, 2009 Share Posted April 8, 2009 Dear all, I have the following code and I get an errormsg because of it... $sql = "SELECT * FROM pictures WHERE username = '$username' AND parent_album = '.$album['album_id']'"; I get the following errormsg: Parse error: parse error, expecting `T_STRING' or `T_VARIABLE' or `T_NUM_STRING' in I think there is a problem with ' or " or . I appriciate any help! Thank you, //Johan Beijar Link to comment https://forums.phpfreaks.com/topic/153150-solved-string-and-integer-help-wanted/ Share on other sites More sharing options...
ILMV Posted April 8, 2009 Share Posted April 8, 2009 Your SQL statement is not formed correctly. $sql = "SELECT * FROM pictures WHERE username = '".$username."' AND parent_album = '".$album['album_id']."'"; If you're string starts with a ", you should open and close it at all times with ". Edit: This might not be the main problem, come back to us if it isn't ILMV Link to comment https://forums.phpfreaks.com/topic/153150-solved-string-and-integer-help-wanted/#findComment-804472 Share on other sites More sharing options...
Johan Beijar Posted April 8, 2009 Author Share Posted April 8, 2009 Hi ILMV, THANK YOU! That did the trick and I truely appriciate your prompt answer. helped me alot! People like you are what makes the world a better place! /Johan Link to comment https://forums.phpfreaks.com/topic/153150-solved-string-and-integer-help-wanted/#findComment-804473 Share on other sites More sharing options...
Johan Beijar Posted April 8, 2009 Author Share Posted April 8, 2009 :-) Link to comment https://forums.phpfreaks.com/topic/153150-solved-string-and-integer-help-wanted/#findComment-804475 Share on other sites More sharing options...
ILMV Posted April 9, 2009 Share Posted April 9, 2009 You're very welcome. ILMV Link to comment https://forums.phpfreaks.com/topic/153150-solved-string-and-integer-help-wanted/#findComment-805254 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.