MySQL trigger, table alias problem - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived General Discussion (https://forum.codeigniter.com/forumdisplay.php?fid=21) +--- Thread: MySQL trigger, table alias problem (/showthread.php?tid=35759) |
MySQL trigger, table alias problem - El Forum - 11-10-2010 [eluser]deczo[/eluser] Hi there, There is a problem when doing INSERT on a MySQL table with trigger set up. The query works just fine without the trigger, but whenever I use the trigger it returns this error: Code: A Database Error Occurred Code: $this->db->query(sprintf('INSERT INTO serwis_sales SET status_id=1 ... I have no idea why CI renames/aliases the table. BTW the trigger works fine when inserting data in phpmyadmin and mysql cli. Any suggestion appreciated! MySQL trigger, table alias problem - El Forum - 11-14-2010 [eluser]deczo[/eluser] Anybody? Has no one ever used mysql triggers with CI? Oh c'mon Any hints will do! MySQL trigger, table alias problem - El Forum - 11-14-2010 [eluser]tonanbarbarian[/eluser] since you are using sprintf with the query command it might help if you gave the complete command you are trying to run to my knowledge CI does not alias tables so maybe something is going wrong with your sprintf |