We use cookies to improve your experience. No personal information is gathered and we don't serve ads. Cookies Policy.

ExpressionEngine Logo ExpressionEngine
Features Pricing Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University
Log In or Sign Up
Log In Sign Up
ExpressionEngine Logo
Features Pro new Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University Blog
  • Home
  • Forums

CSVee Plugin Problems

Development and Programming

Bluebloc's avatar
Bluebloc
111 posts
17 years ago
Bluebloc's avatar Bluebloc

I wonder if anyone could help me. I am using the CSVEE plugin and the code below to download a csv of member info and one member custom field from certain member groups. My problem is that I am getting results from all member groups not just the pipe delimited selected group_ids.

{exp:csvee group_id="1|6|9" query="SELECT m.screen_name, m.username, m.group_id, m.join_date, d.m_field_id_1 FROM exp_members AS m LEFT JOIN exp_member_data AS d ON d.member_id = m.member_id" filename="ggp-subscribers-list.csv"}

Also do you know if its possible to format the display of m.join_date to read as a date rather than the amount of seconds from 1970, the start of the unix epoch, ala “1202917350”?

Thanks

       
Daniel Walton's avatar
Daniel Walton
553 posts
17 years ago
Daniel Walton's avatar Daniel Walton

This was resolved via PM. Thought I would just add the remedy here for the future; The group_id=”” param is used only to instruct which member groups can download the csv and in no way affects the query.

A for the join date formatting (not plugin specific):

SELECT m.screen_name, m.username, m.group_id, date_format(from_unixtime(m.join_date), '%d-%m-%Y') as join_date, d.m_field_id_1 FROM exp_members AS m LEFT JOIN exp_member_data AS d ON d.member_id = m.member_id WHERE m.group_id IN (1,6,9)
       
Bluebloc's avatar
Bluebloc
111 posts
17 years ago
Bluebloc's avatar Bluebloc

And thanks again to Daniel. Mea culpa for not posting solution for you.

       

Reply

Sign In To Reply

ExpressionEngine Home Features Pro Contact Version Support
Learn Docs University Forums
Resources Support Add-Ons Partners Blog
Privacy Terms Trademark Use License

Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.