[wp-hackers] Creating / Inserting into Table named after WP Username
Gregory Lancaster
greglancaster71 at gmail.com
Sun Aug 25 05:55:09 UTC 2013
Woah thanks for the help guys. @Ryan - I am storing custom data, but the
user meta only allows for me to store two fields. The custom data need to
use the INSERT INTO so I have a list of data entered for each user. Right
now I am trying to figure how I can hook into (terminology right?) the
wp_users and create a new table in a sep database for each user that
registers.
The idea is to create a profile page where users can store more data than
they can normally. Upload more than one picture etc. If there is a more
intelligent way to do this PLEASE share! The user_meta is limited though,
thats why I opted to make my own db.
On Sat, Aug 24, 2013 at 8:19 PM, William P. Davis <will.davis at gmail.com>wrote:
> Can you explain what you're trying to do here? We might be able to find a
> method that doesn't need to create a table for each user, which would get
> around this problem entirely.
>
> Will
> Sent from my BlackBerry
>
> -----Original Message-----
> From: Ryan McCue <lists at rotorised.com>
> Sender: "wp-hackers" <wp-hackers-bounces at lists.automattic.com>Date: Sun,
> 25 Aug 2013 11:42:07
> To: <wp-hackers at lists.automattic.com>
> Reply-To: wp-hackers at lists.automattic.com
> Subject: Re: [wp-hackers] Creating / Inserting into Table named after WP
> Username
>
> BenderisGreat wrote:
> > This isnt working, I need to grab the active logged in user via Sql but
> I am
> > unsure how.
>
> I'm not quite sure what you're trying to do here, but you can't get the
> current user via SQL, it's set via cookies.
>
> If you're doing this in a plugin/theme, then please don't use raw SQL
> queries for this. The global $current_user contains all the data you'll
> need, and if you need to store custom data for the user, please use user
> meta instead of custom tables.
>
> If you're doing this in some separate application, you need to load WP
> in and use the authentication functions to get at the data.
>
> More information would be helpful so that we know what you're trying to do.
>
> --
> Ryan McCue
> <http://ryanmccue.info/>
> _______________________________________________
> wp-hackers mailing list
> wp-hackers at lists.automattic.com
> http://lists.automattic.com/mailman/listinfo/wp-hackers
> _______________________________________________
> wp-hackers mailing list
> wp-hackers at lists.automattic.com
> http://lists.automattic.com/mailman/listinfo/wp-hackers
>
More information about the wp-hackers
mailing list