Open gpstiip88 opened 9 years ago
Thanks for finding and figuring it out, I am so busy that I couldn't even look. Thanks
Regards, Sarfraz http://sarfraznawaz.wordpress.com
On Wed, Aug 5, 2015 at 12:54 PM, gpstiip88 notifications@github.com wrote:
When I try to execute a custom query with an update command, I receive a general error: Error: SQLSTATE[HY000]: General error
With some research on Google, I discovered that the command 'fetchAll()' cannot be call after an update command, so I've changed the line 235 on file app/controllers/table.php
From $data = $stmt->fetchAll(PDO::FETCH_ASSOC); to if( preg_match('/^select/i', $query) )$data = $stmt->fetchAll(PDO::FETCH_ASSOC);
and in this way everything works, but without visual results.
I wish that this can be usefull for someone.
— Reply to this email directly or view it on GitHub https://github.com/sarfraznawaz2005/VisualQuery/issues/2.
When I try to execute a custom query with an update command, I receive a general error: Error: SQLSTATE[HY000]: General error
With some research on Google, I discovered that the command 'fetchAll()' cannot be call after an update command, so I've changed the line 235 on file app/controllers/table.php
From $data = $stmt->fetchAll(PDO::FETCH_ASSOC); to if( preg_match('/^select/i', $query) )$data = $stmt->fetchAll(PDO::FETCH_ASSOC);
and in this way everything works, but without visual results.
I wish that this can be usefull for someone.