Welcome Guest, Not a member yet? Register   Sign In
Database Query Problem
#4

[eluser]jedd[/eluser]
On that note, depending on the history of $name before it lands in this function, you might want to do one of two alternatives:

Code:
$this->db->query('SELECT PROJECT_ID FROM PROJECT WHERE TITLE = '. $this->db->escape($name) .' LIMIT 1');

or

Code:
$sql = 'SELECT PROJECT_ID FROM PROJECT WHERE TITLE = ? LIMIT 1';
$this->db->query($sql, array($name));

These are both explained in the Database class section of the user guide.


Messages In This Thread
Database Query Problem - by El Forum - 10-28-2009, 03:33 PM
Database Query Problem - by El Forum - 10-28-2009, 05:33 PM
Database Query Problem - by El Forum - 10-28-2009, 06:54 PM
Database Query Problem - by El Forum - 10-28-2009, 07:08 PM



Theme © iAndrew 2016 - Forum software by © MyBB