Skip to main content

All Questions

Tagged with
Filter by
Sorted by
Tagged with
0 votes
3 answers
237 views

SQL Query to Get count of entries of a certain status inside channel

Right now I have this inside of a channel entries tag. {exp:query sql="SELECT total_entries FROM exp_channels WHERE channel_name = '{url_title}'"} {total_entries} {/exp:query} Which provides me ...
Chris O'Connor's user avatar
0 votes
1 answer
89 views

Passing a GET variable back in a query while using mysqli_real_escape_string()

I'm trying to take a variable that's passed in a query string (GET) and then use that variable to do a SELECT based on it... // Assign query string to a variable while sanitizing it against XSS $...
AllInOne's user avatar
  • 1,079
0 votes
1 answer
77 views

Query exp_channel_data but exclude expired entries

I'm on EE2.10.1, and trying to grab unique countries from a channel that has one field for "country name" and one field for "country code". So I've got the following query: {exp:query sql="SELECT ...
Frank Harrison's user avatar
0 votes
1 answer
35 views

List authors by number of posts in specific channel

I need to display a list of authors that have posted in a specific channel, sorted by number of posts in that channel. I've got this: {exp:query sql="SELECT screen_name, total_entries, member_id FROM ...
Frank Harrison's user avatar
0 votes
1 answer
594 views

Total no of row returned for exp:channel:entries?

{exp:channel:entries channel="channel_1"} //how do i find the total no of entries retuned without exp:query? {/exp/channel:entries} I want to find the count first and then loop?Any idea
user avatar
0 votes
1 answer
313 views

how to put a category condition with exp:query?

{exp:query sql="my query"} {/exp:query}. This works fine.But I want to give a category condition to it.When I do it,it does not flter the data accordingly. for example: {exp:entrie:channel ...
user avatar
2 votes
1 answer
118 views

Query a NON EE table in database?

I have a HTML table where a user can subscribe.I send an ajax call when the user clicks the subscribe button and store it in a non ee table.Next time when the user comes on the same page,I want to ...
user avatar
1 vote
1 answer
86 views

htaccess redirect from non query url to query url

I'm trying to redirect a url from a non-query version to a query version with EE. I can get the redirect working properly on a .php flat-file, such as: RewriteCond %{QUERY_STRING} ^$ RewriteRule ^...
xxx's user avatar
  • 25
2 votes
1 answer
156 views

Wrapping a query in a logic statement

I didn't think this would give me any trouble, but it is. I just want to run a query depending on the URL segments. I have this now: {if segment_3 != ''} {exp:query sql="SELECT a....
W3bGuy's user avatar
  • 1,610
1 vote
1 answer
110 views

Can I use a 'Select' Statement in my EE 2.5 template

I am trying to use a SELECT statement to call in some information. CODE: $qry = $this->EE->db->query('SELECT col_id_1, col_id_2, col_id_3 FROM exp_matrix_data'); I get this error when I try to use ...
JayB's user avatar
  • 59
2 votes
1 answer
112 views

List where our members come from (country)

I've been trying to make a list of where our EE members comes from (country) and later on I will plot this data in to a Google Map to make it more interesting. For the moment I've only come up with ...
John Roe's user avatar