Hot answers tagged

9 votes
Accepted

Assets errors with MySQL 5.7.X

The problem is that many developers don't know how to write compliant SQL statements - they're software developers who find themselves also filling the role of database developers. This problem crops ...
  • 692
6 votes
Accepted

SQL Query to get entries with their categories

I believe this is what you're looking for: SELECT exp_channel_data.entry_id AS entry_id, exp_channel_titles.title AS title, exp_channel_titles.url_title AS url_title, GROUP_CONCAT(cp.cat_id SEPARATOR ...
  • 4,002
4 votes

Run plugin without affecting loading time (external)

You can make a module - like Steve advice. Use Yeoman ExpressionEngine Add-On generator to simplify developing process. On server you will need to setup cron with wget: execute cronjob every day at ...
  • 5,781
4 votes
Accepted

Run plugin without affecting loading time (external)

You can do this by developing your add-on as a module rather than a plugin since only modules can use EE actions. (See the EE docs for an explanation of the difference between the types of add-on.) ...
3 votes

Quick and simple way to determine which templates are used on an EE site and where

There's a similar post here But you could just look in the template debugging info. Another option would be to add something to each template that shows its name (either output to screen or as an ...
  • 7,176
3 votes
Accepted

What's wrong with this SQL query?

I ran it and I'm getting results just fine. Are you outputting the results correctly? $query = ee()->db->query('SELECT cat_url_title, cat_name, ch.channel_name FROM exp_categories c ...
2 votes

Get all entries where expiration date is within last 12 months

Could you not use native parameters for this? {exp:channel:entries channel="mychannel" show_expired="only" start_on="-12 months"}
  • 1,577
2 votes

mySQL script to update non-unique URL titles

How big is the database? Something like the below (untested) should do it with PHP $sql = "SELECT * FROM exp_channel_titles"; $results = //execute query $urls = array(); foreach($results as $result) ...
  • 188
2 votes

Quick and simple way to determine which templates are used on an EE site and where

AFIAK there is no quick/easy/simple way. You're on the hook for trying to generate every page within the site and reverse-engineering it to see what templates were involved. With Templates Routes now ...
2 votes
Accepted

ExpressionEngine versions and MYSQL support

You can dig through the various documentation flavours. From this I can see : EE 2.10 = MySQL 5.0.3 or newer EE 2.9 = MySQL 5.0.3 or newer EE 2.8 = MySQL 5.0.3 or newer How far back do you need ...
  • 2,418
2 votes
Accepted

Reassign uncategorised entries

UPDATE exp_category_posts LEFT JOIN exp_channel_data ON exp_channel_data.entry_id = exp_category_posts.entry_id AND exp_category_posts.entry_id IS NULL AND exp_channel_data.channel_id ...
  • 5,900
2 votes
Accepted

SuperSearch Install Error

SuperSearch has been obsolete for quite sometime (didn't make it past v2) and will not run on newer versions of EE. Try Low Search.
  • 1,987
1 vote
Accepted

CE Cache - if page not yet cached, error: Base table or view not found

It looks from the last error you reported that the CP issue is being caused by a configuration error - EE is trying to delete an entry from a table that doesn't exist (the table ...
  • 3,572
1 vote
Accepted

General error when trying to access templates

All efforts to locate the offending encoded entity failed. I therefore made another backup of the database and all template files and proceeded to systematically delete template files. It ended up ...
  • 1,068
1 vote

General error when trying to access templates

I believe your issue is MySQL attempting to encode an invalid UTF-8 byte sequence. I checked (even though it is obvious if you work with encoding/decoding UTF-8 on string sequences) and \xD5ve is not ...
  • 5,900
1 vote

Is ExpressionEngine compatible with MariaDB?

I run it on a Vagrant box and it seems to work fine.
  • 1,987
1 vote
Accepted

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

Use ee()->db->escape_str($event) - it's the native way to escape potentially-unsafe data in EE.
  • 17.4k
1 vote
Accepted

Use Expresso tags to show stock sold on front end

There is not going to be an actual Store tag that you could use to get this. Having said that it should be fairly simple to query the DB for the information that you need. Something along the lines of:...
  • 7,556
1 vote

Is it safe to change the MySQL storage engine on a live site?

We often change most or all of our tables to InnoDB on our highest traffic sites. The absolute safest thing would be to take the site offline before doing it. That said, we have done it live before ...
  • 1,232
1 vote

Is it safe to change the MySQL storage engine on a live site?

I have a production site running tables on the InnoDB engine; triggers and full-text search indexing and all. Everything seems copacetic. However, I would recommend (before building anything that will ...
  • 5,900
1 vote

MYSQL Error Importing Database

what does your create table code look like? this? DROP TABLE IF EXISTS `exp_accessories`; CREATE TABLE `exp_accessories` ( `accessory_id` int(10) unsigned NOT NULL AUTO_INCREMENT, `...
  • 1,987
1 vote

ExpressionEngine 2.7.3 How do I directly execute a query against the database?

Enable the Profiler (Admin > System Administration > Output and Debugging) so you can see what the query actually being executed is. If you aren't getting results from the second query, I would ...
  • 2,255
1 vote
Accepted

Should I run the EE Install & Update Wizard after updating mySQL

We ran the updates on our server and we didn't run into any problems. It seems EE v2.7.3 is compatible with all of these versions of Redhat, PHP, & MySQL.
  • 121
1 vote

MySQL Script to identify old accounts

Using 60 seconds × 60 minutes × 24 hours × 30 days × 6 months: SELECT username, email, last_visit FROM exp_members WHERE (UNIX_TIMESTAMP(NOW()) - last_visit) > (60*60*24*30*6) ORDER BY username ...
  • 6,108
1 vote

MySQL strict mode: disable on a session basis?

The stricton setting controls whether or not strict mode is forced on, not whether it is on or off. If the server already has it on (as they should), this will not override it. You want to run in ...
  • 2,255
1 vote

What is the MySQL function for exp_members password column?

I want to post an update to this question for EE 5 because the current answer is pretty outdated. In order to set a member's password in the DB, you'll need to know what the hash algorithm is. From /...

Only top scored, non community-wiki answers of a minimum length are eligible