scmeeker Posted September 10, 2010 Share Posted September 10, 2010 I'm having trouble getting my variable to update the database a NULL value. It keeps giving it the value of zero. This is what I'm using and I've tried it several different ways without luck. elseif ($item_fee > "1") { $sold = NULL; } Quote Link to comment https://forums.phpfreaks.com/topic/213020-make-varialble-null/ Share on other sites More sharing options...
PFMaBiSmAd Posted September 10, 2010 Share Posted September 10, 2010 Setting a php variable to null has nothing to do with a null value in a sql query. You would need to use the null keyword in the sql that makes up the query. Quote Link to comment https://forums.phpfreaks.com/topic/213020-make-varialble-null/#findComment-1109463 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.