Reputation: 69
I have this query :
$this->dbSQLServer->select("nom, '' AS prenom")
->from("users");
return $this->dbSQLServer->get()->result_array();
But instead of returning me ''
for the prenom
, I end up with ' '
.
Any ideas where the problem might come from?
Upvotes: 0
Views: 146
Reputation: 9396
Try the Following instead:
$this->dbSQLServer->select("nom, Null AS prenom")
->from("users");
Instead of empty string use Null
Upvotes: 1