Problems with mysql syntax? I don't think so... - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23) +--- Thread: Problems with mysql syntax? I don't think so... (/showthread.php?tid=48592) |
Problems with mysql syntax? I don't think so... - El Forum - 01-22-2012 [eluser]selman555[/eluser] Hi everyone, I'm having some trouble making a login form for my site. I already have a fully working registration form (data goes to the database and back successfully (included in code)) I have a user controller "user" that looks like this: (read the comments in the code for explenations). Code: function register() Now here's the usermodel "user_model". Code: function registerUser($gebruikersnaam, $paswoord, $naam, $voornaam, $email, $activatieCode) { So, the registration part is working (almost the same mysql syntax as login(???)). I get this standard error message (1064): Code: A database error occurred Problems with mysql syntax? I don't think so... - El Forum - 01-22-2012 [eluser]scottwire[/eluser] You have to pass them in as an array like you did in the registerUsers function Code: if ($this->db->query($queryStr, array($gebruikersnaam, $paswoord))) { Problems with mysql syntax? I don't think so... - El Forum - 01-23-2012 [eluser]selman555[/eluser] [quote author="scottwire" date="1327248325"]You have to pass them in as an array like you did in the registerUsers function Code: if ($this->db->query($queryStr, array($gebruikersnaam, $paswoord))) { Thanks for your reply, unfortunetely, that's didn't solve it either. I've made an array just like you said, but still, the data is not being processed by my phpmyadmin mysql database (it does work when registering) Any more ideas? Problems with mysql syntax? I don't think so... - El Forum - 01-28-2012 [eluser]TheFuzzy0ne[/eluser] Can you repost your code and the error please? I find it odd that it should work sometimes as opposed to not at all. |