As far as I know ExpressionEngine will use one or the other, SHA1 or MD5 (I believe SHA1 is the default). In my test it actually worked to use either one when replacing the password, allowing me to login just fine in both cases.
You can use MySQL to generate a new password hash for yourself. For example either SELECT SHA1('pass123') or SELECT MD5('pass123') ...
What you're referring to is the auto increment value in a table. You can change this by running the following query:
ALTER TABLE mytable AUTO_INCREMENT = X
...where X is the next number you'd expect for your IDs.
This is a database-level change and not something ExpressionEngine has as a
"feature". Only make this change if you understand you might break ...
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 up in many addons and was recently fixed in EE core code.
For Assets v2.6
Change line 615 of ft.assets.php
$sql = "SELECT DISTINCT a.source_type, a....
If the item uses the same field_group, you can generally switch channels via the edit menu.
Go to the 'Edit' Menu, Select the Entry, while in the Entry, Select the Options Tab. The choice of channels you can move the item to is listed. See image.
Additionally, if you were going to do it via query, you need to update multiple database tables: ...
There is a setting under Admin → Channel Administration → Channels → Edit Preferences - under the Comment Posting Preferences header - for Comment Expiration.
Set a number of days there, and tick the box for "Update all existing comments with this setting" (which should more accurately read "existing entries").
To be clear this won't close ...
Given that the control panel for comments (Add-ons > Modules > Comments) is a little limited in its date filtering, and if you have lots and lots of comments it would be a chore, a query is probably the best route.
A query that would close all comment entries before Sat, 01 Jan 2011 00:00:00 GMT:
SET status = 'c'
WHERE comment_date < ...
This is because all “id” columns in EE are set to AUTO_INCREMENT in MySQL. Expressionengine is never explicitly choosing what the next member/entry/etc.’s ID is going to be – MySQL assigns it automatically.
MySQL stores the latest auto-increment value internally, and it won’t automatically drop it back when a row is deleted. Some tools like phpMyAdmin will ...
I know you sorted this out, but for others who may wind up here looking for details:
Say you have an entry with an entry_id of 10. That entry's channel has a Relationship field with a field_id of 20.
While editing that entry, you choose a child entry from your Relationship field, which has an entry_id of 50.
You'll end up with these values in your ...
This will definitely require a module. I recommend taking a look into the developer documentation to get a feel for this. I wouldn't write any code to do what you want without a plugin or module. It's not too difficult to get started.
You can use Pkg.io to make your life easier. This ...
Yes, that is the correct way to do it. To clarify this for others, you will need to open up PHPMyAdmin, or any other SQL client which will let you run SQL queries directly.
You can also go to Tools > Data > SQL Manager > Database Query Form in the ExpressionEngine control panel.
Then run this query, replacing 30000 with the order ID you want to assign to ...
Since you would probably prefer to truly just move an existing category to a new group (and not create new ones and reassign entries as outlined below), this SQL is all you would need:
SET group_id = X
WHERE cat_id = Y OR parent_id = Y
X = new category group
Y = parent category that you want to move to new group
The OR ...
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 and exp_channel_data tables. I will only go into the information that's relevant for basic database interaction.
exp_channel_titles contains the basic entry ...
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 '|') AS categories
LEFT JOIN exp_channel_titles ON exp_channel_titles.entry_id = exp_channel_data.entry_id
LEFT JOIN exp_category_posts ...
That should be as simple as this, using the correct channel_id:
set field_id_46 = concat(field_id_41, '|', field_id_42)
where channel_id = 1
For the Maps table, it's something like this:
Insert into exp_mx_google_map
(entry_id, lat, long, some_example_field)
Select entry_id, field_id_41, field_id_42, 'Some example value'
I think you would need a subquery to make this happen
select cd.field_id_XX as first_name, cd.field_id_XX as middle_name,
cd.field_id_XX as last_name, cd.field_id_XX as suffix,
ct.author_id as member_id
from exp_channel_data as `cd`
left join exp_channel_titles as `ct` on cd.entry_id = ct.entry_id
where cd.channel_id = "XX"
and (select count(*) FROM ...
This should cover it.
field_id_49 as 'First Name',
field_id_50 as 'Last Name',
field_id_51 as 'Email',
field_id_56 as 'Date of Birth',
field_id_53 as 'Occupation',
field_id_52 as 'Gender',
field_id_57 as 'Address',
field_id_58 as 'Address 2',
field_id_59 as 'City',
field_id_60 as 'Postal Code',
You can use the channel fields api to get the field names:
$fields = ee()->api_channel_fields->fetch_custom_channel_fields();
//change 1 to your site_id if using MSM
$quantity_field_id = $fields['custom_channel_fields']['your_quantity_field_name'];
$sql .= "picd....
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.)
More info on EE actions here.
Essentially, you need to develop a module to perform your desired action, then call the associated ACT URL (e.g. http://example....
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 3am
00 03 * * * wget http://example.com/index.php?ACT=XX&task_id=1
Or if you want something really quick and simple:
Create a special template with some ...
First thought was we'd add a config var for the MySQL port as per the CodeIngiter docs
$db['default']['port'] = 5432
but that didn't work instead we had to change the hostname to
$db['expressionengine']['hostname'] = "mysqldbinstance.hostname.com:4703";
To get a total of all occurrences across all comments:
SELECT SUM(LENGTH(comment) - LENGTH(REPLACE(comment, '?', ''))) AS occurrences FROM exp_comments
To get the count for each comment in a query result:
SELECT LENGTH(comment) - LENGTH(REPLACE(comment, '?', '')) AS occurrences FROM exp_comments
(MySQL doesn't have a specific function for this, but I ...
You should never have to reinstall addons locally if you are pulling files/DB from production properly. If you are having this problem, the issue is most likely related to how you are doing the migration.
I'd suggest your errors are caused by your exported SQL not including DROP TABLE and you aren't manually dropping the tables in the DB before your import. ...
Sounds like a poorly coded template... First, you should aim to refactor it using the multi_add_to_cart_form instead of the simple add_to_cart_form:
This will give you a single form for all 6 products so should reduce CT's load by 6X. You should then look into other optimisations and ...
Your best bet would be to attempt to repair the table via a database management utility outside of the EE control panel. Does your web host offer anything like a PHPMyAdmin interface, or do you have any experience with standalone MySQL clients like Sequel Pro? Those utilities should expose table repair functionality. I'd start there first.
Before you ...
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 systems that wouldn't suffer this difficulty are those using flat file architecture.
I often use Git with ExpressionEngine. The only possible sticking point being, ...
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
LEFT JOIN exp_channels ch ON ch.cat_group = c.group_id
WHERE c.cat_name LIKE "%'.ee()->db->escape_str($keywords).'%"');
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 HTML comment).
Of course, you would then need to traverse the whole site and note which templates were used, and which ones weren't. Which would possibly be ...