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> Quote Link to comment 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... Quote Link to comment 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> Quote Link to comment 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! Quote Link to comment 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.