Go Back   CodingForums.com > :: Server side development > MySQL

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 02-05-2004, 12:08 AM   PM User | #1
skufft
New to the CF scene

 
Join Date: Feb 2004
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
skufft is an unknown quantity at this point
Single Quotes in mysql statements (PHP)

Should I be using single or double quotes in statements such as
PHP Code:
$db mysql_connect ("localhost""user""password"); 
I know double quotes work, but I know PHP doesn't parse single quotes (therefore faster execution) and *most* statements seem to work fine with single quotes.
skufft is offline   Reply With Quote
Old 02-15-2004, 11:27 PM   PM User | #2
ygrouk
New Coder

 
Join Date: Mar 2003
Posts: 20
Thanks: 0
Thanked 0 Times in 0 Posts
ygrouk is an unknown quantity at this point
hi

to be honest i would just use double quotes

pete
ygrouk is offline   Reply With Quote
Old 02-15-2004, 11:52 PM   PM User | #3
Nightfire
Senior Coder

 
Nightfire's Avatar
 
Join Date: Jun 2002
Posts: 4,266
Thanks: 6
Thanked 48 Times in 48 Posts
Nightfire is on a distinguished road
It really makes no difference in this case, but if you had variables to fill in these areas, then you could only use double quotes or none at all, single quotes won't parse the variables.
__________________
Blue Panda
Website Design | 1 Pound Ads | 'ow much? | Coding Geeks
Nightfire is offline   Reply With Quote
Old 02-16-2004, 02:20 AM   PM User | #4
super kobs
Registered User

 
Join Date: Jan 2004
Location: Florida
Posts: 60
Thanks: 0
Thanked 0 Times in 0 Posts
super kobs is an unknown quantity at this point
I use double quotes if it's like that. If they are variables, i use no quotes at all.
super kobs is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 10:18 PM.


Advertisement
Log in to turn off these ads.