StirCrazy Posted July 22, 2006 Share Posted July 22, 2006 I'm trying to sort out a multisite (passport' ish!) registration system for couple of sites i have planned.I'm trying to add the data into prefixed tables ~ what's wrong with the bit in bold below?At the moment it's just not writing anything to the database at all.global $site_prefix;my_query("insert into [b]$site_prefix . '_users' [/b] (id,username,email,password.....Many Thanks,S.C> Link to comment https://forums.phpfreaks.com/topic/15309-insert-into-site_prefix-_users/ Share on other sites More sharing options...
Joe Haley Posted July 22, 2006 Share Posted July 22, 2006 "insert into $site_prefix . '_users' (id,username,em" = variables are parsed to their values"insert into [b]$site_prefix . '_users'[/b] (id,username,emWrong. Why the .? you never break out of quotes.Try:"insert into {$site_prefix}_users (id,username,em...or'insert into ' . $site_prefix . '_users (id,username,em... Link to comment https://forums.phpfreaks.com/topic/15309-insert-into-site_prefix-_users/#findComment-61944 Share on other sites More sharing options...
StirCrazy Posted July 22, 2006 Author Share Posted July 22, 2006 Luvly job Joe ;D{$site_prefix}_users sorted it out.Thanks for the explaination.S.C> Link to comment https://forums.phpfreaks.com/topic/15309-insert-into-site_prefix-_users/#findComment-61949 Share on other sites More sharing options...
localhost Posted July 22, 2006 Share Posted July 22, 2006 that helps me out as well, I was about to implement that into my software! Link to comment https://forums.phpfreaks.com/topic/15309-insert-into-site_prefix-_users/#findComment-61987 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.