Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Pages: 1
TXP MySQL query
Hi folks ;)
I would like to extract some data from two TXP tables (txp_users and textpattern). Which is the best code to grab the total of articles by users from a specific section?
Note: I need to display the results on only one line by user.
This one doesn’t make the job:
$authors = getRows( 'SELECT * FROM '.safe_pfx('txp_users').' AS a INNER JOIN '.safe_pfx('textpattern').' AS p ON (a.privs < "5" AND p.Status = "4" AND p.Section = "articles") GROUP BY a.user_id' );
Tanks by advance.
Last edited by Pat64 (2011-12-07 19:45:52)
Patrick.
Github | CodePen | Codier | Simplr theme | Wait Me: a maintenance theme | [\a mi.ni.ma]: a “Low Tech” simple Blog theme.
Offline
Re: TXP MySQL query
I don’t know MySql from Pancakes but whenever I use smd_query and read it’s docs I can figure what needs done. I’m sure you aware of that plugin and I know this a MySql question but this thread looked lonely and these are my two cents.
txtstrap (Textpattern + Twitter Bootstrap + etc…)
Offline
Re: TXP MySQL query
Hi Josh.
Thanks for your reply (in the absence of another ;)
Patrick.
Github | CodePen | Codier | Simplr theme | Wait Me: a maintenance theme | [\a mi.ni.ma]: a “Low Tech” simple Blog theme.
Offline
Pages: 1