Database issue [Solved] |
[eluser]eiderbrant[/eluser]
Hello! This is an output from my mysql db Code: mysql> SELECT parameterId, dataValue FROM Parameter, Data, NetworkPlan, NetworkPlanRevision Code: private function isUniqueDataColliding($nnpId) Any ideas? I´m lost...
[eluser]LuckyFella73[/eluser]
I would recommend to use the active record class of Codeigniter: http://ellislab.com/codeigniter/user-gui...ecord.html At first I would check if the variables you have in your method have the values they should have. Put this in your controller: Code: $this->output->enable_profiler(TRUE); then you should see the generated query string in your footer.
[eluser]eiderbrant[/eluser]
Thanks for your reply! I know that the variables are correct. The database query, posted in the post above, comes from the source code above. This will produce the query in the debug printout: Code: $this->writeToDebugFile("isUniqueDataColliding - first query: $sql");
[eluser]Mirge[/eluser]
[quote author="eiderbrant" date="1309864362"] Code: $query = $this->CI->db->query($sql); Change your foreach to foreach($query->result() as $parameter) {...} At the moment, you're iterating through ONE row only.
[eluser]eiderbrant[/eluser]
Hello. I´m not iterating over one row: Quote:$parameters = $query->result();I have solved the problem: The "networkPlanRevisionRealLifeStatus" state was altered during execution and the consequence was no reply in the execution. Code: AND networkPlanRevisionRealLifeStatus LIKE \"In Use\" Thanks for the replies! |
Welcome Guest, Not a member yet? Register Sign In |