[wp-hackers] Creating / Inserting into Table named after WP Username
Gregory Lancaster
greglancaster71 at gmail.com
Mon Aug 26 19:06:06 UTC 2013
When you say on the fly, you mean (for example) when a user registers, have
the user ID copied over into a sep database? That is actually what I am
trying to figure out haha. Id like to have the user->ID copied into a
separate database row *(or create a new table with the user-ID as the table
name)* after registration. If I could figure that out then I imagine the
rest would fall into place for me. The WP loop is something I am still
learning, so I really appreciate the reference information *Nicholas. *
*J.D* - Is that what you meant? Did I understand your question correctly?
if current_user->ID if exists fetch array($result) echo $row[1] etc...
On Mon, Aug 26, 2013 at 11:58 AM, J.D. Grimes <jdg at codesymphony.co> wrote:
> On Aug 26, 2013, at 2:48 PM, Gregory Lancaster <greglancaster71 at gmail.com>
> wrote:
>
> > i appreiate the feedback. The issue I am obviously explaining very
> poorly
> > is that I do not understand how to copy the wordpress ->wp_users ->ID
> field
> > into a separate database. Someone had mentioned hooking into the
> register
> > new user code so everytime someone registers new it creates a new table
> or
> > row whatever in a sep database with a matching user id. That is what I
> am
> > unclear on how to do.
>
> It sounds like you are trying to set up this metadata in the table(s)
> ahead of time (before the data is ever called for). Why do you need to do
> that? The general way of doing things is that you check if the data exists
> in the database, and if not, then you add defaults or whatever. In other
> words, why do you need to set all of the user's data up ahead of time
> instead of just setting it up as needed on the fly? That is the best way to
> do it in my opinion.
>
> _______________________________________________
> 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