Jump to content

how to update table


TheSky

Recommended Posts

do i have to select database also ?

Yes, how else would your program know the BD to use?

 

i think i do and i didnt add it i did run $result = mysql_query($sql) or die(mysql_error()); and it was successful

mysql_query is what actually executes your query.  Read the documentation...

Link to comment
https://forums.phpfreaks.com/topic/237539-how-to-update-table/#findComment-1220656
Share on other sites

UPDATE data SET value1='$value1',value2='$value2',value3='$value3',value4='$value4,value5='$value5' WHERE username='$name'

thanks i found now answer for my question :P

In the future you can temporarily use or die(mysql_error()) to display mysql errors.  But you should eventually fix/handle them properly.

Link to comment
https://forums.phpfreaks.com/topic/237539-how-to-update-table/#findComment-1220689
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.