Welcome Guest, Not a member yet? Register   Sign In
Using CONCAT() in active record
#11

[eluser]TheFuzzy0ne[/eluser]
Yes, my advice is the same as before. Use FALSE as the second parameter to the select statement:

Code:
$this->db->select("CONCAT(firstname, '.', lastname) AS full_name", FALSE);

I'm not quite sure what's going on with $email_to however. First you set the value, then immediately afterwards, you overwrite it with an array.
#12

[eluser]AIM-andrew[/eluser]
[quote author="TheFuzzy0ne" date="1250606023"]Yes, my advice is the same as before. Use FALSE as the second parameter to the select statement:

Code:
$this->db->select("CONCAT(firstname, '.', lastname) AS full_name", FALSE);

I'm not quite sure what's going on with $email_to however. First you set the value, then immediately afterwards, you overwrite it with an array.[/quote]

Thanks for the advice
I tried the SELECT line with the FALSE parameter with no success.

I must admit, I am not well versed in pHp and even less so with CodeIgniter.
The select statement syntax seems strange to me and this thread was the only one I'd found involving CONCAT in a SELECT statement.
I'm confused by the term 'active record' as I'm just querying a MySQL database.

how do I confirm which version of codeigniter we're running?
#13

[eluser]AIM-andrew[/eluser]
Code:
$email_to = $email->getTo();
$email_to[] = $results[0]->full_name;

I believe here that $email is calling its own getTo() method. Which returns the array "to"
Then we add the value of $results[0]->full_name to this "to" array.
#14

[eluser]Unknown[/eluser]
[quote author="SaNNyX" date="1322122798"]CONCAT works find just remove the escape value in the mysq_driver class

Code:
// The character used for escaping
var $_escape_char = '';
[/quote]

it works, but the security is related?

For beginners

\yourproject\system\database\drivers\mysql_driver.php




Theme © iAndrew 2016 - Forum software by © MyBB