Forums

1064 you have an error in your sql syntax

Guusta 23 Feb, 2014
I use in my form DB SAVE with CSV Export v@ [gh] and i get a message
1064 you have an error in your sql syntax .....
and there is no record exported to the csv file.

In earlier joomla versions this was not a problem.

Guusta Theewen
GreyHead 23 Feb, 2014
Hi Guusta,

The action is working OK here - it looks as though there is something odd with the columns list which is showing up as ,,,, instead of *

What settings do you have on the Columns tab?

Bob
Guusta 23 Feb, 2014
See attachment pplease.


guusta Theewen
Guusta 25 Feb, 2014
Is there already a solution for this problem?


Guusta Theewen
Guusta 08 Mar, 2014
Hallo,

You did not give a reaction on my last reply. Mostly you are quick with an answer but this time not.
has this anything to do with joomla 3.2.2 Now joomla 3.2.3 is in use.
Please let me know what possible action i can do to fix this problem.

Regards Guusta
Max_admin 08 Mar, 2014
Hi Guusta,

What do you have under the "Columns" tab ? it looks like there is a problem retrieving the table fields names.

Regards,
Max
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
Guusta 08 Mar, 2014
Please look at the attachment chrono.pdf i sent earlier.


Guusta
GreyHead 08 Mar, 2014
Hi Guusta,

I think that I have found the problem - there was a code change in Joomla! 3. If you are OK editing files please open and look fro this block of code around line 186:
        if ( $include ) {
          $include = explode( ',', $include );
          // check the columns and drop any that are 'excluded'
          // or are not in the table columns list.
          foreach ( $include as $k => $v ) {
            $v = trim( $v );
            if ( in_array( $v, $exclude ) || !in_array( $v, $fields_array ) ) {
              unset( $include[$k] );
              continue;
            }
            $include[$k] = $db->nameQuote( trim( $v ) );
          }
          $include = implode( ', ', $include );
          $exclude = array();
        } elseif ( count( $exclude ) ) {
          $include = array();
          foreach ( $fields_array as $k => $v ) {
            if ( !in_array( $v, $exclude ) ) {
              $include[] = $db->nameQuote( trim( $v ) );
            }
          }
          $include = implode( ', ', $include );
        } else {
          $include = '*';
        }
      }
find the two places that nameQuote is used and replace them with quoteName That should be all that is needed.

Bob
pcheng 17 Mar, 2014
Bob,

which file is the one that I should change? I have the same issue with my registration form.

Thanks,

Pericles
Max_admin 17 Mar, 2014
the .php file under this path:
/administrator/components/com_chronoforms/form_actions/csv_export_gh/

Regards,
Max
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
GreyHead 17 Mar, 2014
Hi Pericles,

The current version of my action has been updated to fix this.

Bob
This topic is locked and no more replies can be posted.