Welcome Guest, Not a member yet? Register   Sign In
Is this codeigniter SQL syntax
#1

[eluser]theknight[/eluser]
$this->db->select(castedColumns($this->contacts_table, $this->db));

I have this within a web application that also uses mem cache. It dislikes the syntax, and after looking at the user guide, there seems to be no mention of this exact syntax.

Thanks.
#2

[eluser]johnpeace[/eluser]
[quote author="theknight" date="1331141892"]$this->db->select(castedColumns($this->contacts_table, $this->db));

I have this within a web application that also uses mem cache. It dislikes the syntax, and after looking at the user guide, there seems to be no mention of this exact syntax.

Thanks.
[/quote]

If the function castedColumns($this->contacts_table, $this->db) returns a string naming one of the fields you want to select...then it's valid...though not the way most of us would do it.

This is at very least incomplete though...$this->db->select() on it's own isn't going to produce anything. Select it from where? Do what with it? Any results?
#3

[eluser]theknight[/eluser]
Full code

$this->db->select(castedColumns($this->contacts_table, $this->db));

$conditions = array('Email' => $username);
if (!$ignore_password) {
$conditions['SaltedAndHashedPortalPassword'] = $password;
}
$q = $this->db->get_where($this->contacts_table, $conditions);

$res = $q->row_array();
#4

[eluser]johnpeace[/eluser]
That could work...what error are you getting?
#5

[eluser]theknight[/eluser]
blank screen after this:

$this->db->select(castedColumns($this->contacts_table, $this->db));

when I completely remove memcaching.
#6

[eluser]johnpeace[/eluser]
What is this:

Code:
castedColumns($this->contacts_table, $this->db)

Where is that function declared?
#7

[eluser]InsiteFX[/eluser]
25 posts and you still do not know how to use code tags!




Theme © iAndrew 2016 - Forum software by © MyBB