mrherman Posted October 3, 2008 Share Posted October 3, 2008 Trying to understand user-defined variables in MySQL. @pull_date = "20081003" UPDATE t1 SET pull_date = @pull_date ; Problem: NULLs are posted to the table. What am I doing wrong? Thanks! Quote Link to comment https://forums.phpfreaks.com/topic/126956-solved-mysql-user-defined-variables/ Share on other sites More sharing options...
Barand Posted October 5, 2008 Share Posted October 5, 2008 mysql_query ("SELECT @pull_date := '20081003' "); mysql_query ("UPDATE t1 SET pull_date = @pull_date "); Quote Link to comment https://forums.phpfreaks.com/topic/126956-solved-mysql-user-defined-variables/#findComment-657335 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.