Mombu the Php Forum

  Mombu the Php Forum > Php > $var or '$var' in a sql if the field is an int ?


User Name
Password
REGISTER NOW! Search Today's Posts Mark Forums Read


Reply
 
Thread Tools Search this Thread Display Modes
1 18th November 07:56
nawfer
External User
 
Posts: 1
Default $var or '$var' in a sql if the field is an int ?



db mysql;

if ID is a field int or bigint

if in the query
.....
WHERE ID = '$var'

and $var= 10;

I can use write so '$var' or so $var (no '') ?
or there aren't difference?

or for security is better use '$var' and not $var also for numeric
field?
  Reply With Quote
SPONSORED LINKS BY GOOGLE

 


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes







Copyright © 2006 SmartyDevil.com - Dies Mies Jeschet Boenedoesef Douvema Enitemaus -
Also visit Ogoun the Usenet Archive
666