[wp-hackers] Creating / Inserting into Table named after WP Username

Gregory Lancaster greglancaster71 at gmail.com
Mon Aug 26 16:46:22 UTC 2013


so i still have the same issue- how to steup the sql to create the table so
it matches the current active user.

On Sunday, August 25, 2013, Guus (IFS) wrote:

> User id not the index of course, but a field (indexed would be nicest).
>
> ----- Original Message ----- From: "Guus (IFS)" <
> guus at inspiration-for-success.com>
> To: <wp-hackers at lists.automattic.com>
> Sent: Monday, August 26, 2013 12:49 PM
> Subject: Re: [wp-hackers] Creating / Inserting into Table named
> afterWPUsername
>
>
>  I did not folllow the whole conversation, but I understand you want to
>> create a table per user? I don't think that's a good idea, but you could
>> make an additional table and make the user id the index and store then
>> something like user id, meta key, meta value, start date, end date.
>>
>> ----- Original Message ----- From: "J.D. Grimes" <jdg at codesymphony.co>
>> To: <wp-hackers at lists.automattic.com>
>> Sent: Sunday, August 25, 2013 11:49 PM
>> Subject: Re: [wp-hackers] Creating / Inserting into Table named after
>> WPUsername
>>
>>
>>  The only reason I am doing it this way is because I want to have a
>>>> historical record - Meaning show the whole table, including all rows,
>>>> which
>>>> will be dated and include several rows.  wp_usermeta only allows for one
>>>> value per key and updating it results in the loss of the previous entry.
>>>> That wont work for me.
>>>>
>>>
>>> I just wanted to add another comment on this. You *can* have multiple
>>> values for the same key in the usermeta table. There can be multiple rows
>>> with the same meta_key, and different meta_values. I just wanted to
>>> clarify that. So if you wanted to you could store all of your values in
>>> the usermeta table with duplicate keys, and add a date as part of the
>>> value for each record (as part of an array, for example). But it still
>>> sounds to me that in your case, a separate table with a date column would
>>> be better.
>>> ______________________________**_________________
>>> wp-hackers mailing list
>>> wp-hackers at lists.automattic.com
>>> http://lists.automattic.com/**mailman/listinfo/wp-hackers<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<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<http://lists.automattic.com/mailman/listinfo/wp-hackers>
>


More information about the wp-hackers mailing list