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 ...
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 ...
5
votes
Accepted
Getting To Know The EE Database Structure
My answer assumes you are for example trying to pull channel data manually. I'm not entirely sure of the OOP / Foreign key part of the question.
First you need to understand the exp_channel_titles ...
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 ...
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 ...
3
votes
ExpressionEngine source control via git
Can you define what you mean by "a modern CMS"? Any database driven system will face similar problems when using Git source control. This isn't specifically an ExpressionEngine problem. The only ...
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
Categories of a category_group won’t show
You need to specify the channel parameter, and you can leave out dynamic="no" because that's not a parameter for this tag.
If specifying the channel parameter does not work,try adding the following ...
2
votes
Expresso Checkout conditional (use hook?)
I recently made an extension to do this, so I've put it up on GitHub for others to learn from.
https://github.com/expressodev/store_order_export
Generally, you want to use the ...
2
votes
Expresso Checkout conditional (use hook?)
I think either method would work.
The hook is going to be the more nerdy (read "hard") way to do it. I use the store_order_complete_end hook to trigger code that notifies other systems of the order. ...
2
votes
Accepted
Problem importing database - import hangs on exp_stash table
For this particular quandary, this worked:
Add this line to the top of the SQL file:
SET FOREIGN_KEY_CHECKS = 0;
Source: http://devot-ee.com/add-ons/support/stash/viewthread/5700
If you see this ...
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"}
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)
...
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
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 ...
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
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
vote
Is ExpressionEngine compatible with MariaDB?
I run it on a Vagrant box and it seems to work fine.
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.
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
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:...
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
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 ...
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 ...
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.
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
...
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 /...
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 ...
1
vote
Accepted
How does exp_channel_data table allocate it's primary key?
The primary key for entries are generated in the exp_channel_titles table. When the entry is created the data first goes there and then it inserts into the exp_channel_data table using the same key.
...
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
mysql × 111database × 28
php × 11
query × 11
ee2 × 10
error × 7
cartthrob × 6
add-on × 6
custom-fields × 6
sql × 6
database-error × 6
channel-entries × 5
categories × 5
performance × 5
ee1 × 4
expresso-store × 3
solspace × 3
supersearch × 3
super-admin × 3
templates × 2
solspace-freeform × 2
assets × 2
members × 2
control-panel × 2
relationships × 2