Re: Error: SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; But execute is trying to use function name as the $sql

2012-12-05 Thread lowpass
Cake can't find your ShooterOption class. Are you sure the file is named ShooterOption.php? Delete everything in app/tmp/cache/models/ directory. On Tue, Dec 4, 2012 at 1:11 PM, glk g...@kaup.com wrote: Hello all, thank you in advance for any help you may be able to provide. I'm using

Error: SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; But execute is trying to use function name as the $sql

2012-12-04 Thread glk
Hello all, thank you in advance for any help you may be able to provide. I'm using cakePHP 2.2.1 The following code works perfectly: class OptionsController extends AppController { var $uses = array('Option', 'ShooterEvent', 'ShooterOption'); public function calc($id) { $paid_entries

Re: Error: SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; But execute is trying to use function name as the $sql

2012-12-04 Thread Andras Kende
If inside the class ShooterOption class change : $this-ShooterOption-getSomething(1); to: $this-getSomething(1); also on your public function calc($id) { $paid_entries = $this-ShooterEvent-getPaidEntries($event_id); Where is $event_id coming from ? should it be just $id