CodeIgniter Forums
Strange problem in active records - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forum-20.html)
+--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forum-23.html)
+--- Thread: Strange problem in active records (/thread-57024.html)



Strange problem in active records - El Forum - 02-08-2013

[eluser]siptik[/eluser]
Hi all And sorry for my English.
Yesterday I had the strange problem:
It worked fine (bottom my code) but then I started getting the error.

Code:
function get_last_vacancies()
    {
    $this->db->select('*');
    $this->db->from('job_vacanсies');
    $this->db->join('job_specialty', 'job_vacanсies.v_specialty_id = job_specialty.specialty_id', 'left');
    return $this->db->get()->result_array();
    }

active record generate a wrong string:

Quote:SELECT * FROM (`job_vacanсies`) LEFT JOIN `job_specialty` ON `job_vacan`с`ies`.`v_specialty_id` = job_specialty.specialty_id

Have a look at `job_vacan`с`ies`.

Then I renamed the table name into "job_vac" and it started working fine.
Then I return the old name and it works fine again.

Question: How I can reproduce the error again?
what is reason of emergence of a mistake?


Strange problem in active records - El Forum - 02-08-2013

[eluser]Otemu[/eluser]
Hi,

Maybe was a quirk, you say it working now and you can't replicate the error again so don't worry about it ;-)


Strange problem in active records - El Forum - 02-08-2013

[eluser]siptik[/eluser]
it's very interesting why I got the error )