Jump to content

[SOLVED] UPDATE quote


Ken2k7

Recommended Posts

Is it mandatory to have the quotes in the UPDATE query as shown below:

 

mysql_query("UPDATE member SET name='$name', age='$age', location='$loc', sex='$sex', interests='$interests' WHERE id='$id'");

 

or can I do this:

 

mysql_query("UPDATE member SET name=$name, age=$age, location=$loc, sex=$sex, interests=$interests WHERE id=$id");

 

Thanks in advance. I would've tested myself but this requires another php file that I haven't created yet, so that's why I'm asking. It's like a mini-project.

Link to comment
https://forums.phpfreaks.com/topic/66298-solved-update-quote/
Share on other sites

Hi..

        if its int,float then its ok..

        but if its string then ur data contain , or anything junk sql injection then you will have error or

        there would be problem in data..

 

Regards,

Vijay

 

You like to come in threads and repeat what I say don't yer lol.

Link to comment
https://forums.phpfreaks.com/topic/66298-solved-update-quote/#findComment-331680
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.