943,759 Members | Top Members by Rank

Ad:
  • MySQL Discussion Thread
  • Unsolved
  • Views: 746
  • MySQL RSS
Nov 21st, 2008
0

Different quote marks

Expand Post »
I am new to MySQL and did not notice this before. In order to get the query to work I have to use two different quote marks. Notice that the single quotes on the left where I list the column names are from the keyboard key with the tilde `~ and the single quotes on the right are from the keyboard key with the double quotes ‘ “. This seems strange to me. What am I missing?
Thanks!

sql Syntax (Toggle Plain Text)
  1. CREATE TABLE `indiant1_indiantreaty`.`events`
  2. (`recordNum` INT (6) NOT NULL AUTO_INCREMENT PRIMARY KEY COMMENT 'unique record number',
  3. `Type` VARCHAR(20) NOT NULL COMMENT 'xxxxx Could be an enumeration',
  4. `eventName` VARCHAR(255) NOT NULL COMMENT 'The name of event',
  5. `aka` VARCHAR(255) NOT NULL COMMENT 'Another name of the event',
  6. `DATE` DATE NOT NULL COMMENT 'Date of the event',
  7. `site` VARCHAR(255) NOT NULL COMMENT 'site of the event',
  8. `description` TINYTEXT NOT NULL COMMENT 'description of the event',
  9. `Signers` VARCHAR(255) NOT NULL COMMENT 'A list of signers',
  10. `links` VARCHAR(255) COMMENT 'A list of significant links of signer',
  11. `extra1` VARCHAR(255) COMMENT 'Temporary extra column',
  12. `extra2` VARCHAR(255) COMMENT 'Temporary extra column',
  13. `extra3` VARCHAR(255) COMMENT 'Temporary extra column'
  14. ) ENGINE = MYISAM COMMENT = 'Indian Signers Table';
Last edited by peter_budo; Nov 28th, 2008 at 12:22 pm. Reason: Keep It Organized - For easy readability, always wrap programming code within posts in [code] (code blocks) and [icode] (inline code) tags.
Similar Threads
Reputation Points: 10
Solved Threads: 1
Junior Poster
rouse is offline Offline
111 posts
since Dec 2007
Nov 22nd, 2008
0

Re: Different quote marks

1). You probably donot have the
`indiant1_indiantreaty` database
or
2). you already have the `events` table.

I ran your query and it showed no errors except for the database `indiant1_indiantreaty` didnot exist.

If it is case 1., create your database first, then execute the statement

If it is case 2. Drop table `event` and execute the query.

I hope I am correct and did not miss out anything.

Regards ...
Reputation Points: 10
Solved Threads: 3
Newbie Poster
sasankasekhar is offline Offline
24 posts
since Jan 2007
Nov 22nd, 2008
0

Re: Different quote marks

The query is valid. The issue is the type of single quotes you have to use. Can you see the difference between ` and ' in the query example?
When I just use ‘ throughout the query I get an invalid query. I hope that makes sense.
Reputation Points: 10
Solved Threads: 1
Junior Poster
rouse is offline Offline
111 posts
since Dec 2007

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in MySQL Forum Timeline: mysql does not start now
Next Thread in MySQL Forum Timeline: 4 Ways to Insult IT Workers





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC