Jump to content

Archived

This topic is now archived and is closed to further replies.

StirCrazy

insert into $site_prefix . '_users' (?)

Recommended Posts

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>

Share this post


Link to post
Share on other sites
"insert into $site_prefix . '_users'  (id,username,em
" = variables are parsed to their values

"insert into [b]$site_prefix . '_users'[/b]  (id,username,em
Wrong. 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...

Share this post


Link to post
Share on other sites
Luvly job Joe  ;D

{$site_prefix}_users sorted it out.

Thanks for the explaination.

S.C>

Share this post


Link to post
Share on other sites

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.