⚠ In case you've missed it, we have migrated to our new website, with a brand new forum. For more details about the migration you can read our blog post for website migration. This is an archived forum. ⚠

  •     

profile picture

search filter by id



orochimaru
  • profile picture
  • Member

Posted 08 October 2012 - 08:06 AM

hi there i've been using this wonderful project for some time now "3 weeks"

my problem is when i try to search filter by id "primary key" in flex grid it just won't work

$crud->columns('id','dentist_id','emp_id','contact_person_id','case_description','date');

i added the id to columns is there any other steps i should do?

thank you in advance

EDIT :by the way

my console returns this


[b] A Database Error Occurred[/b]

Error Number: 1052
[color=#ff0000][b]Column 'id' in where clause is ambiguous[/b][/color]
SELECT * FROM (`dentist_trans`) LEFT JOIN `dentist` as jcb2c5ef9 ON `jcb2c5ef9`.`id` = `dentist_trans`.`dentist_id` LEFT JOIN `employees` as ja3933a0b ON `ja3933a0b`.`emp_id` = `dentist_trans`.`emp_id` WHERE `id` LIKE '%1%'
Filename: C:\xampp\htdocs\med\system\database\DB_driver.php
Line Number: 330

orochimaru
  • profile picture
  • Member

Posted 08 October 2012 - 08:27 AM

i found a work around
i must rename the id to something else like trans_id
so that it would be unique in query

i think this is a bugg