Strange problem with tables |
[eluser]Lakshminarayanank[/eluser]
Hi guys.... Actually i am checking for a particular data in a table... Its present.. but still it cant find it... I deleted that column and inserted it again.. This time when i tried its finding correctly... I cant get out of this... Plz tell me a solution.. I am a fresher to codeigniter and php mysql programming..
[eluser]jblack199[/eluser]
K first off. When asking for help on code and such... you must.. MUST... actually post code for people to look at -- or at the very least give a very detailed description of what you want to do... second, when posting code.. you MUST use [*code][*/code] tags (without the *'s) because it makes it all so much easier to read.... Now in your case, i could go to the tutorials on the CI wiki and watch them all. http://codeigniter.com/wiki/Category:Help::Tutorials You'll learn quite a bit about CI, and PHP/MySQL programming just from watching those.... but really, if you are brand new to PHP as a whole -- you might be a bit over your head trying to learn CI... I'd recommend starting off just learning PHP.. develop some full applications with basic PHP -- move into OOP programming -- and after a good 2 years or so -- then learn CI 'cause by then you might have the understanding to be able to change your coding style to fit with the CI syntax and methodologies.
[eluser]Lakshminarayanank[/eluser]
k guys... here is my code... 'memberone' is my column name in 'project' table, but its not working, i just deleted the row and re entered all values.. then its working perfectly... am familiar with many similar code which is working well... by the way am not a total fresher.. i have been working for the past 20 days.. but i dont know how to solve this... $this->db->where('memberone',$sid); $query= $this->db->get('project'); if($query->num_rows()> 0) { echo 'Your Project Found 1'; foreach($query->result() as $row) { $pid= $row->project_id; } } else return 0;
[eluser]psychoder[/eluser]
[code]$this->db->where(‘memberone’,$sid); $query= $this->db->get(‘project’); if($query->num_rows()> 0) { echo ‘Your Project Found 1’; foreach($query->result() as $row) { $pid= $row->project_id; echo $pid; } } else return 0; [code] |
Welcome Guest, Not a member yet? Register Sign In |