I installed today's version 4.7 of cck.

when i make a view and go to the url i get

warning: mysql_real_escape_string() expects parameter 1 to be string, array given in /home /public_html /includes/database.mysql.inc on line 349.
warning: mysql_real_escape_string() expects parameter 1 to be string, array given in /home /public_html /includes/database.mysql.inc on line 349.

after i pick a value and hit submit, the error does not seem to return on subsequent visits to the same view. this is for an exposed filter.

Comments

mwu’s picture

when I added an exposed filter,
I got the errors above plus

warning: (blah)
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 ''')' at line 1 query: SELECT count(node.nid) FROM node node LEFT JOIN node_data_field_location node_data_field_location ON node.vid = node_data_field_location.vid LEFT JOIN node_content_photo3_listing node_data_field_photo1 ON node.vid = node_data_field_photo1.vid LEFT JOIN node_content_photo3_listing node_data_field_photo2_name ON node.vid = node_data_field_photo2_name.vid WHERE (node_data_field_location.field_location_value OR '') AND (. '') in /home/public_html/includes/database.mysql.inc on line 120.
warning: (blah)
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 ''') ORDER BY node_data_field_photo2_name.field_photo2_name_value ASC LIMIT ' at line 1 query: SELECT node.nid, node.title AS node_title, node.changed AS node_changed, node_data_field_photo2_name.field_photo2_name_value AS node_data_field_photo2_name_field_photo2_name_value, node_data_field_location.field_location_value AS node_data_field_location_field_location_value, node_data_field_photo1.field_photo1_value AS node_data_field_photo1_field_photo1_value, node.changed AS node_changed FROM node node LEFT JOIN node_data_field_location node_data_field_location ON node.vid = node_data_field_location.vid LEFT JOIN node_content_photo3_listing node_data_field_photo1 ON node.vid = node_data_field_photo1.vid LEFT JOIN node_content_photo3_listing node_data_field_photo2_name ON node.vid = node_data_field_photo2_name.vid WHERE (node_data_field_locatio in /home/public_html/includes/database.mysql.inc on line 120.

fago’s picture

Status: Active » Fixed

update both modules, then clear your cache (submitting your admin/modules page) and try again.

Anonymous’s picture

Status: Fixed » Closed (fixed)
mwu’s picture

This problem occurs on a clean install. so it would not have been caused by the lack of running update.php.

irishsuperfly’s picture

Was this issue ever really resolved? I've run into these error messages and every search I've done, it seems the threads get closed without a solution. I can disable CCK and Views, delete every node and View associated with them, then recreate my setup and it works without errors. The moment I start adjusting the View settings is when these errors reappear. I have installed the latest releases of both CCK and Views, run update.php, resubmitted the modules page.... I'm using Drupal 4.7.4 with no other add-on modules.


    * warning: mysql_real_escape_string() expects parameter 1 to be string, array given in /public_html/includes/database.mysql.inc on line 350.
    * 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 ''') AND (. '')' at line 1 query: SELECT count(node.nid) FROM node node LEFT JOIN node_content_personals_ad node_data_field_matchs_maximum_age ON node.vid = node_data_field_matchs_maximum_age.vid LEFT JOIN node_content_personals_ad node_data_field_my_age ON node.vid = node_data_field_my_age.vid LEFT JOIN node_content_personals_ad node_data_field_matchs_minimum_age ON node.vid = node_data_field_matchs_minimum_age.vid LEFT JOIN node_content_personals_ad node_data_field_personals_title ON node.vid = node_data_field_personals_title.vid WHERE (node.type IN ('content_personals_ad')) AND (node.status = '1') AND (node_data_field_matchs_maximum_age.field_matchs_maximum_age_value OR '') AND (. '') AND (. '') in /public_html/includes/database.mysql.inc on line 121.
    * warning: mysql_real_escape_string() expects parameter 1 to be string, array given in /public_html/includes/database.mysql.inc on line 350.
    * 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 ''') AND (. '') ORDER BY node_data_field_my_age.field_my_age_value ASC LIMIT ' at line 1 query: SELECT node.nid, node_data_field_personals_title.field_personals_title_value AS node_data_field_personals_title_field_personals_title_value, node_data_field_my_age.field_my_age_value AS node_data_field_my_age_field_my_age_value, node_data_field_matchs_minimum_age.field_matchs_minimum_age_value AS node_data_field_matchs_minimum_age_field_matchs_minimum_age_value, node_data_field_matchs_maximum_age.field_matchs_maximum_age_value AS node_data_field_matchs_maximum_age_field_matchs_maximum_age_value FROM node node LEFT JOIN node_content_personals_ad node_data_field_matchs_maximum_age ON node.vid = node_data_field_matchs_maximum_age.vid LEFT JOIN node_content_personals_ad node_data_field_my_age ON node.vid = node_data_field_my_age.vid LEFT JOIN node_cont in /public_html/includes/database.mysql.inc on line 121.