ProgrammingThis forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Double quotes should be fine, it's backticks that try to relate table names (at least in true SQL). Of course if this were a PHP script and the double quotes weren't escaped...
What version of MySQL are you running? Also, are you certain that there exists a client="10.66.15.18" at all?
I can execute a similar query with strings and " " with no problems (in MySQL 4.0.23a). Access may treat SQL differently but as far as I know MySQL sticks pretty close to the SQL standard, MSA may um, not.
His first post mentions Access, not MySQL. In MS-SQL Server and Access double quotes ARE used to denote identifiers like table/field names. The same is true for IBM's DB2. And it's been awhile since I've used it, but I think the same applies to Oracle.
Even though MySQL supports using the double quotes, single quotes would probably be better to use as it is more ANSI compliant SQL.
Just out of curiosity, I checked out the SQL-92 BNF a bit. I've always used single quote identifiers in MySQL as well, just because I knew that was the ANSI standard. It surprised me that MySQL also allowed you to use double quotes for string literals.
It would appear that the double quote usage is one place that MySQL is not compliant with the SQL-92 standard... I was thinking that maybe the standard allowed the implementation to define the indentifier delimiter, but apparently it states that a double quote is to be used.
As a side note, in Access and MS-SQL server, the left/right brackets can be used in place of double quotes as well.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.