Jump to content

Updating Field to Null


gusty

Recommended Posts

Hi,

I'm trying to change a field in my sql table back to NULL. (default). It's if the user enters info to the wrong row and wants to change back to NULL. The code I use changes the field to 0 when executed. I've searched for this here and online and I'm not sure what's happening. I could use 0 but curious to what's happening. Here's my code.

$delSQL = sprintf("UPDATE table SET field1='NULL' WHERE field2=%s",
GetSQLValueString($vr, "text"));

I would appreciate any pointers you can give me.
Thanks,
Gusty.
Link to comment
https://forums.phpfreaks.com/topic/8253-updating-field-to-null/
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.