Question
Problem with mysql queries using 'bitwise and' operator - '&'
It seems that dreamweaver's php/mysql model does not properly
handle a query
that uses the mysql bitwise operator '&'.
Test case to demonstrate this:
1) create database:
CREATE TABLE bitwisetest (
id smallint(6) NOT NULL default '0',
number1 int(4) NOT NULL default '0',
number2 int(4) NOT NULL default '0',
PRIMARY KEY (id)
) TYPE=MyISAM;
INSERT INTO bitwisetest VALUES (1, 1, 1);
INSERT INTO bitwisetest VALUES (2, 2, 1);
INSERT INTO bitwisetest VALUES (3, 4, 2);
INSERT INTO bitwisetest VALUES (4, 6, 4);
INSERT INTO bitwisetest VALUES (5, 6, 4);
INSERT INTO bitwisetest VALUES (6, 9, 1);
INSERT INTO bitwisetest VALUES (7, 9, 3);
INSERT INTO bitwisetest VALUES (8, 9, 6);
INSERT INTO bitwisetest VALUES (10, 1234, 78);
INSERT INTO bitwisetest VALUES (11, 2345, 567);
2) Create recordset with either of the following SQL statements:
SELECT * FROM `bitwisetest` WHERE (number1 & number2)
SELECT (number1 & number2) FROM `bitwisetest`
Although MySQL itself has no trouble handling either of these queries, when
I have either one in a Recordset dialog box and click 'test', or try to view
the result set placeholders in the Bindings panel by clicking the '[+]'
beside the recordset name, DW reports the following error:
MySQL Error#: 1064
You have an error in your SQL syntax near '' at line 1
and the result set placeholders are not available in the Bindings panel.
Is there some Dreamweaver setting I am missing or adjustment I can make to
Dreamweaver so that it can handle these queries properly?
that uses the mysql bitwise operator '&'.
Test case to demonstrate this:
1) create database:
CREATE TABLE bitwisetest (
id smallint(6) NOT NULL default '0',
number1 int(4) NOT NULL default '0',
number2 int(4) NOT NULL default '0',
PRIMARY KEY (id)
) TYPE=MyISAM;
INSERT INTO bitwisetest VALUES (1, 1, 1);
INSERT INTO bitwisetest VALUES (2, 2, 1);
INSERT INTO bitwisetest VALUES (3, 4, 2);
INSERT INTO bitwisetest VALUES (4, 6, 4);
INSERT INTO bitwisetest VALUES (5, 6, 4);
INSERT INTO bitwisetest VALUES (6, 9, 1);
INSERT INTO bitwisetest VALUES (7, 9, 3);
INSERT INTO bitwisetest VALUES (8, 9, 6);
INSERT INTO bitwisetest VALUES (10, 1234, 78);
INSERT INTO bitwisetest VALUES (11, 2345, 567);
2) Create recordset with either of the following SQL statements:
SELECT * FROM `bitwisetest` WHERE (number1 & number2)
SELECT (number1 & number2) FROM `bitwisetest`
Although MySQL itself has no trouble handling either of these queries, when
I have either one in a Recordset dialog box and click 'test', or try to view
the result set placeholders in the Bindings panel by clicking the '[+]'
beside the recordset name, DW reports the following error:
MySQL Error#: 1064
You have an error in your SQL syntax near '' at line 1
and the result set placeholders are not available in the Bindings panel.
Is there some Dreamweaver setting I am missing or adjustment I can make to
Dreamweaver so that it can handle these queries properly?
