Imaulle Posted December 20, 2010 Share Posted December 20, 2010 hihi, I'm new to php/sql so could someone please help with my syntax $newQuery = "UPDATE ServerList SET UsedSlots='.$NewUsedSlots.' WHERE ServerNumber='$row['ServerNumber']'"; I'm missing a ' or " or . or something but I'm not sure which tbh. thanks! Quote Link to comment https://forums.phpfreaks.com/topic/222209-syntax-error/ Share on other sites More sharing options...
PFMaBiSmAd Posted December 20, 2010 Share Posted December 20, 2010 You can put php variables into an over-all double-quoted string without using concatenation (the dot operator) - $newQuery = "UPDATE ServerList SET UsedSlots='$NewUsedSlots' WHERE ServerNumber='{$row['ServerNumber']}'"; Quote Link to comment https://forums.phpfreaks.com/topic/222209-syntax-error/#findComment-1149524 Share on other sites More sharing options...
Imaulle Posted December 20, 2010 Author Share Posted December 20, 2010 that did it, thank you! Quote Link to comment https://forums.phpfreaks.com/topic/222209-syntax-error/#findComment-1149525 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.