From the MySQL docs:
"There is a hard limit of 4096 columns per table, but the effective maximum may be less for a given table."
Keep in mind that each field uses two columns, one for field data, another for field type. So divide the maximum column limit by two, and then subtract 3 for the entry_id, site_id, and channel_id columns; which leave you with ...
The following should work:
UPDATE exp_channels SET channel_auto_link_urls = 'n';
Backup your DB first though! Always better to be safe.
My answer assumes that you know about the Database Query Form. It's located in Tools » Data » SQL Manager » Database Query Form.
Removed backtick quotes from around table / ...
You can change the fieldtype to MEDIUMTEXT or LONGTEXT and it will work fine for your needs. But you need to be aware that that change will not be supported by EE and that future EE updates may alter the schema and of course could reset the fieldtype to TEXT.
Reference - http://expressionengine.com/forums/viewthread/211174/
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 ...
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: ...
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....
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 ...
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 ...
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 ...
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 ...
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 ...
What's Going Wrong
You've already spotted the problem but here's a quick explanation of why the error is occurring. If you enable pagination EE1's query module will issue two queries - one calculates the total number of results sans-pagination and the other issues the query itself with an additional LIMIT parameter.
The total results query is generated by ...
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 ...
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'
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. ...