whizzykid Posted May 4, 2009 Share Posted May 4, 2009 I created this and when i try to use the login in form it shows table doesnt exist. This is my code. where it always point to. $LoginRS__query=sprintf("SELECT Login,Password FROM Customer Login WHERE Login=%s AND Password=%s", helpppp Quote Link to comment https://forums.phpfreaks.com/topic/156824-solved-help-needed/ Share on other sites More sharing options...
Ken2k7 Posted May 4, 2009 Share Posted May 4, 2009 Remove the Login before WHERE. The table is just called Customer right? Quote Link to comment https://forums.phpfreaks.com/topic/156824-solved-help-needed/#findComment-825987 Share on other sites More sharing options...
whizzykid Posted May 4, 2009 Author Share Posted May 4, 2009 No the table name is Customer Login. Quote Link to comment https://forums.phpfreaks.com/topic/156824-solved-help-needed/#findComment-825988 Share on other sites More sharing options...
Ken2k7 Posted May 4, 2009 Share Posted May 4, 2009 You have a space in your table name? Put backticks around the name. Quote Link to comment https://forums.phpfreaks.com/topic/156824-solved-help-needed/#findComment-825991 Share on other sites More sharing options...
premiso Posted May 4, 2009 Share Posted May 4, 2009 Not that I suggest using spaces in table names (infact I would avoid it at all costs) but this would fix it: $LoginRS__query=sprintf("SELECT Login,Password FROM `Customer Login` WHERE Login=%s AND Password=%s", The backtick (`) will be needed whenever you call that table name because of the space. Quote Link to comment https://forums.phpfreaks.com/topic/156824-solved-help-needed/#findComment-825992 Share on other sites More sharing options...
whizzykid Posted May 4, 2009 Author Share Posted May 4, 2009 Yes i have space btw the name.And thank you i hv included the back ticks and it works now.Wow 2nd problem solved.this is so cool.Thanks ken. Quote Link to comment https://forums.phpfreaks.com/topic/156824-solved-help-needed/#findComment-825996 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.