[eluser]Unknown[/eluser]
Hey guys,
I'm totally stuck on the following code:
Code:
$this -> db -> where ('name', $name);
$query = $this -> db -> get ($this -> tables['members']);
if ($query -> num_rows()) return true;
else return false;
The problem is, that I get the following error:
Quote:A Database Error Occurred
Error Number: 1054
Unknown column 'DayBay' in 'where clause'
SELECT * FROM (`guild_members`) WHERE `name` = DayBay
In this case, the following variables contain the following data:
$name = 'DayBay'.
$this -> tables['members'] = 'guild_members'.
The problem with the query is, that it's not adding the additional ' marks before and after the value (In this case DayBay).
Am I doing something wrong, or is it a bug?
Cheers for helping,