10-16-2017, 04:46 PM
Two things.
You should be binding your variables.
Second thing, you are making $project_get_id a full array, not just one result. If you want one line, use instead of results(). If you want to use and obtain more than one line, you will need to foreach.
Note this is going to overwrite the $this_id variable if you use it outside of the foreach
You should be binding your variables.
Code:
$project_get = $db->query("SELECT * FROM apps_project WHERE token = ?",($project_token));
Second thing, you are making $project_get_id a full array, not just one result. If you want one line, use
Code:
first()
Code:
results()
Code:
foreach ($project_get->results() as $project_get_id) { $this_id = $project_get_id->id; }
Note this is going to overwrite the $this_id variable if you use it outside of the foreach