I enable the taxonomy_term,

and made some changes in that and i saved , Then it through the ERROR

user warning: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'LIMIT 0, 1' at line 1 query: SELECT count(node.nid) AS num_nodes FROM node node WHERE (node.status = '1') GROUP BY LIMIT 0, 1 in C:\wamp\www\bharani\includes\database.mysql.inc on line 172.

After i view that taxonomy related content it through the error like

* user warning: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')) FROM node node WHERE (node.status = '1')' at line 1 query: SELECT count(DISTINCT()) FROM node node WHERE (node.status = '1') in C:\wamp\www\bharani\includes\database.mysql.inc on line 172.
* user warning: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'LIMIT 0, 10' at line 1 query: SELECT count(node.nid) AS num_nodes FROM node node WHERE (node.status = '1') GROUP BY LIMIT 0, 10 in C:\wamp\www\bharani\includes\database.mysql.inc on line 172.
* user warning: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'LIMIT 0, 1' at line 1 query: SELECT count(node.nid) AS num_nodes FROM node node WHERE (node.status = '1') GROUP BY LIMIT 0, 1 in C:\wamp\www\bharani\includes\database.mysql.inc on line 172.

Comments

thelocaltourist’s picture

Version: 5.x-1.03 » 6.x-2.0-rc1

I have the same problem and I need to go live in two days! HELP!

bharanikumariyerphp’s picture

may i know

for what purpose u want ...texonomy_term

iansears’s picture

I am ALSO having the same error today.
Mine started when I deleted a custom content type.
Anyone know what could be throwing this error?

Thanks in advance for any comments towards solutions.

Ian

merlinofchaos’s picture

Version: 6.x-2.0-rc1 » 5.x-1.x-dev

Ok, this bug was originally against Views 1 for D5 and was recategorized to Views 2, with NO INFORMATION. Please don't do that.

thelocaltourist’s picture

Hi Earl - Sorry about that. I didn't realize I'd changed it. BTW - thanks for all your work!

Rodeo.be’s picture

i still get the error....

artis’s picture

I'm getting this error too. I noticed that "FROM node node" is in the SQL statement. There is no table like that...it should just be "FROM node"... I'm pretty sure. Problem is I can't figure out what module is causing the problem. Views?

merlinofchaos’s picture

Status: Needs work » Active

FYI there is not anywhere near enough information in here for me to debug this. If all you have to add is "I get this error too" then please go read up on how to actually submit issue reports. I need completeness.

kulfi’s picture

Getting the following error with Views 1, exposed filters, when a filter operator 'contains' is used:

    * user warning: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'node'ruc%'))' at line 1 query: SELECT count(DISTINCT(node.nid)) FROM node node LEFT JOIN content_type_bio node_data_field_bio_name ON node.vid = node_data_field_bio_name.vid LEFT JOIN content_type_bio node_data_field_bio_address ON node.vid = node_data_field_bio_address.vid LEFT JOIN content_type_bio node_data_field_bio_primary_roles ON node.vid = node_data_field_bio_primary_roles.vid LEFT JOIN content_type_bio node_data_field_bio_organisation_function ON node.vid = node_data_field_bio_organisation_function.vid LEFT JOIN content_type_bio node_data_field_bio_available_for_freelan ON node.vid = node_data_field_bio_available_for_freelan.vid WHERE (node.status = '1') AND (node.type IN ('bio')) AND (UPPER(node_data_field_bio_name.field_bio_name_last) LIKE UPPER(''node'ruc%')) in /var/www/drupal/includes/database.mysql.inc on line 172.
    * user warning: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'node'ruc%')) GROUP BY node.nid LIMIT 0, 10' at line 1 query: SELECT DISTINCT(node.nid), node.title AS node_title, node.changed AS node_changed, node_data_field_bio_name.field_bio_name_last AS node_data_field_bio_name_field_bio_name_last, node_data_field_bio_name.field_bio_name_first AS node_data_field_bio_name_field_bio_name_first, node_data_field_bio_name.field_bio_name_middle AS node_data_field_bio_name_field_bio_name_middle, node_data_field_bio_name.field_bio_name_prefix AS node_data_field_bio_name_field_bio_name_prefix, node_data_field_bio_name.field_bio_name_suffix AS node_data_field_bio_name_field_bio_name_suffix, node_data_field_bio_name.field_bio_name_last_preferred AS node_data_field_bio_name_field_bio_name_last_preferred, node_data_field_bio_name.field_bio_name_first_preferred AS node_data_field_bio_name_field_bio_name_first_preferred, node_data_field_bio_name.field_bio_name_middle_preferred AS node_data_field_bio_name_field_bio_name_middle_preferred, node_data_field_bio_name.field_bio_name_prefix_preferred AS node_data_field_bio_name_field_bio_name_prefix_preferred, node_data_field_bio_name.field_bio_name_suffix_preferred AS node_data_field_bio_name_field_bio_name_suffix_preferred, node_data_field_bio_address.field_bio_address_street1 AS node_data_field_bio_address_field_bio_address_street1, node_data_field_bio_address.field_bio_address_street2 AS node_data_field_bio_address_field_bio_address_street2, node_data_field_bio_address.field_bio_address_apt AS node_data_field_bio_address_field_bio_address_apt, node_data_field_bio_address.field_bio_address_city AS node_data_field_bio_address_field_bio_address_city, node_data_field_bio_address.field_bio_address_state AS node_data_field_bio_address_field_bio_address_state, node_data_field_bio_address.field_bio_address_zip AS node_data_field_bio_address_field_bio_address_zip, node_data_field_bio_address.field_bio_address_country AS node_data_field_bio_address_field_bio_address_country, node_data_field_bio_address.field_bio_address_other AS node_data_field_bio_address_field_bio_address_other, node_data_field_bio_primary_roles.field_bio_primary_roles_value AS node_data_field_bio_primary_roles_field_bio_primary_roles_value, node_data_field_bio_organisation_function.field_bio_organisation_function_value AS node_data_field_bio_organisation_function_field_bio_organisation_function_value, node_data_field_bio_available_for_freelan.field_bio_available_for_freelan_value AS node_data_field_bio_available_for_freelan_field_bio_available_for_freelan_value FROM node node LEFT JOIN content_type_bio node_data_field_bio_name ON node.vid = node_data_field_bio_name.vid LEFT JOIN content_type_bio node_data_field_bio_address ON node.vid = node_data_field_bio_address.vid LEFT JOIN content_type_bio node_data_field_bio_primary_roles ON node.vid = node_data_field_bio_primary_roles.vid LEFT JOIN content_type_bio node_data_field_bio_organisation_function ON node.vid = node_data_field_bio_organisation_function.vid LEFT JOIN content_type_bio node_data_field_bio_available_for_freelan ON node.vid = node_data_field_bio_available_for_freelan.vid WHERE (node.status = '1') AND (node.type IN ('bio')) AND (UPPER(node_data_field_bio_name.field_bio_name_last) LIKE UPPER(''node'ruc%')) GROUP BY node.nid LIMIT 0, 10 in /var/www/drupal/includes/database.mysql.inc on line 172.

An export of my view:

  $view = new stdClass();
  $view->name = 'view_members';
  $view->description = 'Find members';
  $view->access = array (
);
  $view->view_args_php = '';
  $view->page = TRUE;
  $view->page_title = 'Find members';
  $view->page_header = '';
  $view->page_header_format = '1';
  $view->page_footer = '';
  $view->page_footer_format = '1';
  $view->page_empty = '';
  $view->page_empty_format = '1';
  $view->page_type = 'table';
  $view->url = 'find_members';
  $view->use_pager = TRUE;
  $view->nodes_per_page = '10';
  $view->sort = array (
  );
  $view->argument = array (
  );
  $view->field = array (
    array (
      'tablename' => 'node',
      'field' => 'title',
      'label' => 'Username',
      'handler' => 'views_handler_field_nodelink',
      'options' => 'link',
    ),
    array (
      'tablename' => 'node_data_field_bio_name',
      'field' => 'field_bio_name_last',
      'label' => 'Name ',
      'handler' => 'content_views_field_handler_group',
      'sortable' => '1',
      'options' => 'default',
    ),
    array (
      'tablename' => 'node_data_field_bio_address',
      'field' => 'field_bio_address_street1',
      'label' => 'Address ',
      'handler' => 'content_views_field_handler_group',
      'sortable' => '1',
      'options' => 'default',
    ),
    array (
      'tablename' => 'node_data_field_bio_primary_roles',
      'field' => 'field_bio_primary_roles_value',
      'label' => 'Primary Role(s)',
      'handler' => 'content_views_field_handler_group',
      'options' => 'default',
    ),
    array (
      'tablename' => 'node_data_field_bio_organisation_function',
      'field' => 'field_bio_organisation_function_value',
      'label' => 'Organisation function',
      'handler' => 'content_views_field_handler_group',
      'options' => 'default',
    ),
    array (
      'tablename' => 'node_data_field_bio_main_areas_of_interes',
      'field' => 'field_bio_main_areas_of_interes_value',
      'label' => 'Main areas of interest and expertise ',
      'handler' => 'content_views_field_handler_group',
      'options' => 'default',
    ),
    array (
      'tablename' => 'node_data_field_bio_available_for_freelan',
      'field' => 'field_bio_available_for_freelan_value',
      'label' => 'Available for freelance work',
      'handler' => 'content_views_field_handler_group',
      'options' => 'default',
    ),
  );
  $view->filter = array (
    array (
      'tablename' => 'node',
      'field' => 'status',
      'operator' => '=',
      'options' => '',
      'value' => '1',
    ),
    array (
      'tablename' => 'node',
      'field' => 'type',
      'operator' => 'OR',
      'options' => '',
      'value' => array (
  0 => 'bio',
),
    ),
    array (
      'tablename' => 'node',
      'field' => 'distinct',
      'operator' => '=',
      'options' => '',
      'value' => array (
  0 => 'distinct',
),
    ),
    array (
      'tablename' => 'node_data_field_bio_name',
      'field' => 'field_bio_name_last_default',
      'operator' => 'contains',
      'options' => '',
      'value' => '',
    ),
    array (
      'tablename' => 'node_data_field_bio_address',
      'field' => 'field_bio_address_street1_default',
      'operator' => 'contains',
      'options' => '',
      'value' => '',
    ),
    array (
      'tablename' => 'node_data_field_bio_primary_roles',
      'field' => 'field_bio_primary_roles_value_default',
      'operator' => 'OR',
      'options' => '',
      'value' => array (
  0 => '1',
  1 => '2',
  2 => '3',
  3 => '4',
  4 => '5',
  5 => '6',
  6 => '7',
  7 => '8',
  8 => '9',
  9 => '10',
  10 => '11',
),
    ),
    array (
      'tablename' => 'node_data_field_bio_organisation_function',
      'field' => 'field_bio_organisation_function_value_default',
      'operator' => 'OR',
      'options' => '',
      'value' => array (
  0 => '1',
  1 => '2',
  2 => '3',
  3 => '4',
  4 => '5',
  5 => '6',
  6 => '7',
  7 => '8',
  8 => '9',
  9 => '10',
  10 => '11',
  11 => '12',
  12 => '13',
  13 => '14',
),
    ),
    array (
      'tablename' => 'node_data_field_bio_main_areas_of_interes',
      'field' => 'field_bio_main_areas_of_interes_value_default',
      'operator' => 'OR',
      'options' => '',
      'value' => array (
  0 => '1',
  1 => '2',
  2 => '3',
  3 => '4',
  4 => '5',
  5 => '6',
  6 => '7',
  7 => '8',
  8 => '9',
  9 => '10',
  10 => '11',
  11 => '12',
  12 => '13',
  13 => '14',
  14 => '15',
  15 => '16',
  16 => '17',
  17 => '18',
  18 => '19',
  19 => '20',
  20 => '21',
  21 => '22',
  22 => '23',
  23 => '24',
  24 => '25',
  25 => '26',
  26 => '27',
  27 => '28',
  28 => '29',
  29 => '30',
  30 => '31',
  31 => '32',
  32 => '33',
  33 => '34',
  34 => '35',
  35 => '36',
  36 => '37',
  37 => '38',
  38 => '39',
  39 => '40',
  40 => '41',
  41 => '42',
  42 => '43',
  43 => '44',
  44 => '45',
  45 => '46',
  46 => '47',
  47 => '48',
  48 => '49',
  49 => '50',
  50 => '51',
  51 => '52',
),
    ),
    array (
      'tablename' => 'node_data_field_bio_available_for_freelan',
      'field' => 'field_bio_available_for_freelan_value_default',
      'operator' => 'OR',
      'options' => '',
      'value' => array (
  0 => '1',
  1 => '2',
),
    ),
  );
  $view->exposed_filter = array (
    array (
      'tablename' => 'node_data_field_bio_name',
      'field' => 'field_bio_name_last_default',
      'label' => 'Name ',
      'optional' => '1',
      'is_default' => '0',
      'operator' => '1',
      'single' => '0',
    ),
    array (
      'tablename' => 'node_data_field_bio_address',
      'field' => 'field_bio_address_street1_default',
      'label' => 'Address ',
      'optional' => '1',
      'is_default' => '0',
      'operator' => '1',
      'single' => '0',
    ),
    array (
      'tablename' => 'node_data_field_bio_primary_roles',
      'field' => 'field_bio_primary_roles_value_default',
      'label' => 'Primary Role(s)',
      'optional' => '1',
      'is_default' => '0',
      'operator' => '1',
      'single' => '0',
    ),
    array (
      'tablename' => 'node_data_field_bio_organisation_function',
      'field' => 'field_bio_organisation_function_value_default',
      'label' => 'Organisation function',
      'optional' => '1',
      'is_default' => '0',
      'operator' => '1',
      'single' => '0',
    ),
    array (
      'tablename' => 'node_data_field_bio_main_areas_of_interes',
      'field' => 'field_bio_main_areas_of_interes_value_default',
      'label' => 'Main areas of interest and expertise',
      'optional' => '1',
      'is_default' => '0',
      'operator' => '1',
      'single' => '0',
    ),
    array (
      'tablename' => 'node_data_field_bio_available_for_freelan',
      'field' => 'field_bio_available_for_freelan_value_default',
      'label' => 'Available for freelance work',
      'optional' => '1',
      'is_default' => '0',
      'operator' => '1',
      'single' => '0',
    ),
  );
  $view->requires = array(node, node_data_field_bio_name, node_data_field_bio_address, node_data_field_bio_primary_roles, node_data_field_bio_organisation_function, node_data_field_bio_main_areas_of_interes, node_data_field_bio_available_for_freelan);
  $views[$view->name] = $view;
iansears’s picture

Ok,
This may not be of help at all, but it corrected my problem.
In my case, I received this error immediately after deleting a Content Type that the View was supposed to be displaying. So, in my case, I simply deleted the View. Of course, all was good there. It may be that if I had told the View to work on a different Content Type rather than the CT I had deleted, that it also would have corrected my issue.

I sincerely hope this helps someone. In my case this issue is closed though.

iansears

sun’s picture

Status: Active » Fixed
Anonymous’s picture

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.