A Database Error Occurred Error Number 1064 Codeigniter
Contents |
forgot password? This is an archived forum and may no longer be relevant. The active forums are here. Advanced Search Database Error Occurred Erro Number: 1064 otto Posted: 29 April 2013 01:02 AM Joined: 2005-02-1147 posts I just updated my site
Error Number 1064 Mysql
from 2.5.2 to 2.6 and, when I went to publish or edit an entry, I update set `last_activity` get this error message: A Database Error Occurred Error Number: 1064 You have an error in your SQL syntax; check the
Select Data Where Id Codeigniter
manual that corresponds to your MySQL server version for the right syntax to use near ‘) ORDER BY `screen_name` ASC, `username` ASC' at line 4 SELECT `member_id`, `group_id`, `username`, `screen_name`, `in_authorlist` FROM (`exp_members`) WHERE `in_authorlist` = you have an error in your sql syntax; check the manual that corresponds to your mysql server version ‘y' OR `group_id` IN () ORDER BY `screen_name` ASC, `username` ASC Filename: models/member_model.php Line Number: 997 I am confused. There is only one member. Myself. HOW can I fix this ASAP?? syntax8 Posted: 29 April 2013 03:37 AM [ # 1 ] Joined: 2007-01-051 posts I have the same message. Same problem Okapi Creative Posted: 29 April 2013 10:46 AM [ # 2 ] Joined: 2003-01-18333 posts me too….any info? Okapi Creative Posted: 29 April 2013 04:39 PM [ # 3 ] Joined: 2003-01-18333 posts Anyone get anywhere with this? Is a pretty serious showstopper… otto Posted: 29 April 2013 10:05 PM [ # 4 ] Joined: 2005-02-1147 posts It is a SHOW STOPPER. I have a number of client's sites that I have to upgrade soon. BUT… if this issue isn't resolved, there's NO WAY I'll be updating their sites any time soon!! That's just crazy. Hopefully it's a simple thing…. I have one other site to "test" it on… where losing a few days (??) putting up entries is okay… but the client's are putting up entries every day and losing that ability ... would lose me my business. Anyone at EE read these very often? thanks otto Okapi Creative Posted: 30 April 2013 02:52 AM [ # 5 ] Joined: 2003-01-18333 posts Might have to roll back to previous version but will cause the client some pain and really don't want to….why is this sort of thing able to happen?? otto Posted: 30 April 2013 11:28 PM [ # 6 ] Joined: 2005-02-1147 posts Seems almost like there isn't anyone at EllisLab anymore?? NOBODY at EE is responding to any of the posts I have been making over the last week
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more about Stack Overflow the company Business Learn more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 4.7 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up A Database Error Occurred in CodeIgniter, Error Number: 1064 up vote -1 down vote favorite What's https://ellislab.com/forums/archive/viewthread/235043 wrong with my query? When i execute that query, the app always show Error Number: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ') and d.module_id=b.module_id)privileges from `acl_module_gro' at line 5". Here's my model's function: $str_group = ''; $qry = "select * from acl_usergroup_member where user_id=$user_id"; $j = $this->db->query($qry); if($j->num_rows > 0){ $data http://stackoverflow.com/questions/24607854/a-database-error-occurred-in-codeigniter-error-number-1064 = $j->result(); foreach ($data as $row) { if($str_group=='') { $str_group .= $row->group_id; }else{ $str_group .= ','. $row->group_id; } } } $query = "select distinct id, name from ( select `a`.id,`a`.name,`b`.module_id,`b`.module_group_id, `c`.module_name,`c`.description,`c`.module_url, (select max(priv) from `acl_usergroup_priv` `d` where `d`.group_id in ($str_group) and `d`.module_id=`b`.module_id)`privileges` from `acl_module_group` `a` inner join `acl_module_group_member` `b` on `a`.id=`b`.module_group_id inner join `acl_module` `c` on `b`.module_id=`c`.id)xview where `privileges` > 0"; $i = $this->db->query($query); return ($i->num_rows > 0) ? $i->result() : array(); Thank you! php mysql sql codeigniter share|improve this question edited Jul 7 '14 at 10:12 asked Jul 7 '14 at 9:57 firewalls 309 1 What is $str_group and it contains which type of value? –Sadikhasan Jul 7 '14 at 9:59 echo your $query and post it in your question –M Khalid Junaid Jul 7 '14 at 10:29 @Sadikhasan i just update the script, please check –firewalls Jul 7 '14 at 10:30 Can you echo your query and put in question so we can help further –Sadikhasan Jul 7 '14 at 10:40 add a comment| 1 Answer 1 active oldest votes up vote 0 down vote if($j->num_rows > 0){ $data = $j->result(); foreach ($data as $row) { if($str_group=='') { $str_group .= $row->group_id; }else{ $str_group .= ','. $row->group_id; } } $str_group = trim($str_group, "
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more about Stack Overflow the company Business Learn more about hiring developers or posting ads with us http://stackoverflow.com/questions/36390725/code-igniter-database-error-no-1064 Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 4.7 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up code igniter database error no 1064 up vote 0 down vote favorite A Database Error Occurred Error Number: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near error number 'WHERE 0 = 'junaid' LIMIT 1' at line 2 SELECT * WHERE 0 = 'junaid' LIMIT 1 Filename: libraries/Form_validation.php Line Number: 1134 when I enter data in the username and password fields, like username = junaid and pasword=12345.. and this record is present in users database having a login column.. please tell me how to get rid of this error codeigniter share|improve this question edited Apr 4 at 5:01 Pathik Vejani 2,31111233 asked Apr 3 at 20:24 Junaid Ali 11 What is 0 error number 1064 supposed to mean here? Why not SELECT * WHERE username = 'junaid' LIMIT 1? –Matt Ball Apr 3 at 20:25 i dont know about this 0 matt.. –Junaid Ali Apr 3 at 21:47 You will need to read a good tutorial to archive this.. Your sql is wrong, you must use something like: select * from tableName where useraname='junaid' and password = '1234..' and then check if exist that user, but you will need to store passwords in no plain text format and return the user if it is correct. If you are using CI, you should post the controller + modell php. –JP. Aulet Apr 3 at 21:47 this is controller. –Junaid Ali Apr 4 at 8:49 its too long for a comment.. –Junaid Ali Apr 4 at 8:51 add a comment| active oldest votes Know someone who can answer? Share a link to this question via email, Google+, Twitter, or Facebook. Your Answer draft saved draft discarded Sign up or log in Sign up using Google Sign up using Facebook Sign up using Email and Password Post as a guest Name Email Post as a guest Name Email discard By posting your answer, you agree to the privacy policy and terms of service. Browse other questions tagged codeigniter or ask your own question. asked 5 months ago viewed 27 times Related 0PHP Code Igniter Database Error0A Database Error Occurred Error Number: 1064-1Query Join On two table fail at error code 10640Error Number: 10