Jump to content

insert into $site_prefix . '_users' (?)


StirCrazy

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>
Link to comment
https://forums.phpfreaks.com/topic/15309-insert-into-site_prefix-_users/
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...

Archived

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

×
×
  • Create New...

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.