Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

232
Views
¿Qué tiene de malo esta consulta en el registro activo CodeIgniter 2?

Tengo algún problema con el registro activo en CodeIgniter 2.

SQL funciona perfectamente:

 SELECT c.title , c.post_status , d.data FROM content c JOIN content_fields_data d ON c.id = d.item_id WHERE c.full_tpl = 'page_doctor' AND d.field_name = 'field_docid'

Pero cuando intente escribir esta consulta en estilo de registro activo, así:

 $this->db->select('c.title, c.post_status','cd.data', false); $this->db->from('content as c'); $this->db->join('content_fields_data as cd', 'c.id = cd.item_id','left'); $this->db->where('c.full_tpl', 'page_doctor'); $this->db->where('cd.field_name', 'field_docid'); $allDatas = $this->db->get()->result_array();

No veo en la salida cd.data .

¿Qué estoy haciendo mal?

over 4 years ago · Santiago Trujillo
1 answers
Answer question

0

Por accidente, dividió su lista de columnas en los argumentos de dos métodos, debería ser una cadena

 $this->db->select('c.title, c.post_status, cd.data', false);
over 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!