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! 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']}'"; 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! Link to comment https://forums.phpfreaks.com/topic/222209-syntax-error/#findComment-1149525 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.