Different quote marks

Reply

Join Date: Dec 2007
Posts: 53
Reputation: rouse is an unknown quantity at this point 
Solved Threads: 1
rouse rouse is offline Offline
Junior Poster in Training

Different quote marks

 
0
  #1
Nov 21st, 2008
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!

  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.
Reply With Quote Quick reply to this message  
Join Date: Jan 2007
Posts: 24
Reputation: sasankasekhar is an unknown quantity at this point 
Solved Threads: 3
sasankasekhar's Avatar
sasankasekhar sasankasekhar is offline Offline
Newbie Poster

Re: Different quote marks

 
0
  #2
Nov 22nd, 2008
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 ...
IF SOMEONE FEELS THAT THEY HAD NEVER MADE A MISTAKE IN THEIR LIFE, THEN  IT MEANS THEY HAD NEVER TRIED A NEW THING IN THEIR LIFE
Reply With Quote Quick reply to this message  
Join Date: Dec 2007
Posts: 53
Reputation: rouse is an unknown quantity at this point 
Solved Threads: 1
rouse rouse is offline Offline
Junior Poster in Training

Re: Different quote marks

 
0
  #3
Nov 22nd, 2008
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.
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:



Similar Threads
Other Threads in the MySQL Forum
Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC