Put value to array |
Hi guys, I'm stuck on this:
Is there any possible to get the value from here: Code: $result = mysql_query("SELECT estimated_sum FROM burndown_snap WHERE project_id ='$sum1' AND name='$sum2'"); And put the values here: Code: $actualArray = array(? , ? , ?); It's not so simple as I thought. Cannot just put there $variabele it's dosent work. Any suggestions?
Wrong board if you use mysql_query...
if you use codeigniter and mysql_query you do not read the manual from codeigniter. $variabele['b'] = $row['estimated_sum'] . ","; echo $variabele['b']; \b never see it
Can somebody build the codeigniter querry from this:
Code: $sql = "SELECT estimated_sum FROM burndown_snap WHERE project_id='$sum1' AND name='$sum2'"; Or something similar that I could list the values from the database.
(12-08-2016, 03:03 AM)Fraps900 Wrote: Can somebody build the codeigniter querry from this: https://forum.codeigniter.com/thread-667...#pid339078 Wouter60 postet this link http://www.codeigniter.com/userguide3/da...index.html read it.
It is very easy.
First select what you want PHP Code: $this->db->select('estimated_sum'); Then add some conditions PHP Code: $this->db->where('project_id', $sum1); Then get the results PHP Code: $results = $this->db->get('burndown_snap'); https://www.codeigniter.com/user_guide/d...cting-data I would strongly suggest that the docs (which are extensive, clearly written and extremely detailed with great examples) is well worth a read from top to bottom. You can start at the beginning or skip to here: https://www.codeigniter.com/user_guide/d...-reference |
Welcome Guest, Not a member yet? Register Sign In |