Questions tagged [database]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
1
vote
1answer
394 views

How to edit the Date Created value that appears on the Entry page

I've just noticed that there's a Date Created value that appears for each entry in the control panel. Here's a screenshot: . How can I edit this Date Created value? I've just looked at the ...
3
votes
1answer
547 views

Mobile app authentication

We're trying to use Craft as a CMS for a mobile app and to accomplish this we need to convert entries to JSON. We use the Element API plugin for this and it works like a charm. The problem is that ...
2
votes
1answer
203 views

Error when creating a Matrix or installing a Plugin

We have 2 computers with a new Craft Pro trial installation. The files are exactly the same on both computers. We both use the same DB with the same db.php config settings. We can both see the site ...
4
votes
2answers
712 views

MSSQL Support for Craft?

Is there a MSSQL support for Craft CMS? Or any plugin that can help to connect to a MSSQL database? Thank you!
1
vote
1answer
405 views

Queries in devMode

When I look at the console log when devMode is enabled, I notice there's a lot going on, and I'm not sure if what I'm seeing is normal or not. There are dozens of [trace][system.db.CDbCommand]\...
3
votes
2answers
6k views

Migration of Craft CMS from one host to another

I'm a newbie in Craft CMS. I need to make changes in an existing craft website which is with one hosting platform. The site was previously managed by another developer. I need to migrate to a new ...
4
votes
1answer
386 views

Many db requests with relationship fields

I have a page with a lot of entries fields. They are awesome but that leads also to a LOT of db requests. Aside from caching are there some best practices to lower db requests on entries fields? For ...
2
votes
2answers
266 views

Getting metadata/column names for empty resultset

I have a dynamically generated sql. How can I know what the column names are, even if the database returns an empty result? $sql = "select t.bar, count(o.foo) as amount from craft_table t ...
3
votes
1answer
125 views

Database import in admin Control Panel

Is it somehow possible to import a dumped database from the admin control panel? I'm currently dumping my database in the control panel and import the dumped file in the phpmyadmin interface. I'd ...
1
vote
2answers
729 views

Multi-Environment Config Database Credentials

Being driven to distraction trying to setup multiple environments with Craft. I have Craft running (and working) locally without issue. I have created a staging server with Digital Ocean and setup the ...
0
votes
1answer
64 views

Database issue on upgrade to 2.5 on shared hosting

I have a problem with upgrading to Craft 2.5 on a shared hosting platform. I have run the upgrade both automatically and also tried manually. It runs but when I try to update the database I get a ...
5
votes
1answer
211 views

Good practice to "Clear Caches" before you "Backup Database"?

Every time I create a database backup, I find myself instinctively clearing the cache first. My gut tells me that any cached data would be unnecessarily included in the export. Is this helpful, or am ...
6
votes
1answer
428 views

How many entries could the Craft database hold before it slows down?

I'm pulling in some RSS feeds using Feed Me (https://github.com/engram-design/FeedMe) and turning those in entries automatically using a cron job. You can imagine that producing a lot of entries over ...
2
votes
1answer
571 views

Table 'craft.craft_elementindexsettings' doesn't exist

I have a local site that was running perfectly, but last year when I ran the auto-update it seems that it did not finish the process. At that time didn't have time to have a look to what happened (...
0
votes
1answer
81 views

Database Backup Contains Perplexing Number Of Duplicates

I recently had a craft update fail when moving from 2.4x to 2.5x. This was probably caused because the linux user craft was using did not have the proper permissions. This is all good and fine. Craft ...
3
votes
2answers
1k views

General speed/performance on large Craft build

Looking for hints and tips on speeding up and streamlining performance of a Craft site as we prepare for launch. The database is approaching 100MB and whilst it is a fairly large and complex build (...
0
votes
1answer
244 views

Craft database and Github - using multiple computers. Issue

I have Craft set up and am using it for the first time. It seems to be ok. I am using git to back up my project to Github and push/pull it between computers as I partly work on my desktop (Windows) ...
0
votes
1answer
435 views

Missing buttons in settings after update to 2.5 beta

After updating my dev install to 2.5 beta, I seem to be missing the action buttons for each tool category in the settings page, see attached image. Anyone else experienced this? This applies to all ...
1
vote
1answer
240 views

CDbException warning 1265 after updating matrix field

A testimonial matrix field has existed in our system for a couple of months. I've just deleted a block that's no longer needed, and am now receiving a SQL warning related to another one of the blocks. ...
0
votes
1answer
167 views

Migrating a Craft site to a different host.

I'm moving my site from one host to another, and I'm having some trouble moving my craft site over. I have all of the files moved, and in the config file I'm pointing to the new database which I've ...
1
vote
1answer
60 views

Updating Craft removed a channel from the CMS?

Anyone experienced this problem? I have a dev site set up which we updated to 2.4.2702. After updating one of my section channels has disappeared from the CMS. The entries for the channel are still ...
4
votes
1answer
1k views

Craft CMS Database Structure and Schema Schematics

Is there somewhere that we can find a the schematics of crafts database structure/schema. We are looking into developing a database migration workflow between development and production environments. ...
2
votes
1answer
502 views

Laravel Homestead & Craft: Craft can’t connect to the database with the credentials in craft/config/db.php

I'm following these instructions to Setting up a local dev environment for Craft CMS with Laravel Homestead. When I go to http://my-craft-site.dev/admin, I get: Craft can’t connect to the database ...
2
votes
1answer
538 views

CDbException after updating field type

I've just changed a rich text field to a number field and am now unable to bring up either the front-end or the dashboard because of multiple CDbException errors. When trying to access /admin, here's ...
2
votes
2answers
198 views

How to UNION Craft blog articles array with Social Media plugin (non craft table)

I'm looking for a way to merge blog article entries with social media entries (non craft table). The idea is to output both entry types together from the same array, this will allow me to order all ...
3
votes
1answer
915 views

Translated entry page can not be found (404)

I have installed and built a website using Craft CMS (with latest updates). I'm running this Craft installation on a Homestead virtual machine. When I enabled localization and translated entries in ...
3
votes
1answer
1k views

How do I build a LIKE query with DbCommand/Query Builder?

I'm trying to construct a fairly simple LIKE query using the Query Builder, and I'm struggling. Here's the SQL that I want: SELECT `id` FROM `craft_somecustomtable` WHERE ((`somecolumn` LIKE '%foo%') ...
2
votes
1answer
58 views

Will craft attempt to reconnect to MySQL if the connection drops?

We have a customer using a cheap managed hosting provider, and their MySQL server very aggressively times out and drops the connection. I wonder if this could be causing us troubles as outlined here:...
2
votes
1answer
729 views

Dealing with existing data in a separate database

I'm creating a site with Craft that needs to communicate with an existing database, which is separate from the database Craft will be installed on. My client is already using an existing online ...
2
votes
2answers
555 views

Where are Matrix Entries Fields Relationships in the Database?

I can see the simple matrix field data in the craft_matrixcontent_MYMATRIXtable. craft_matrixcontent_MYMATRIX --------------------------- id | elementId | locale | field_BLOCKTYPE_FIELDHANDLE | ...
1
vote
1answer
355 views

How do I optimise this colossal query?

This complex query makes the server cpu run at 100%. {% set entries = craft.entries({ section: sectionParam, search: searchParam, relatedTo: relatedToParams, condition: ...
5
votes
1answer
233 views

How could I make related entries load faster?

I need to show a list of users (around 400). No problem, the list loads in 1.5s, for which I could use {% cache %} to speed it up. Now, the problem arises whenever I want to display the title of an ...
5
votes
2answers
330 views

Deleted Locale, Entries all gone now

I deleted a locale and checked to transfer all its contents to a different locale, but now the other locale still shows no entries. I'm sure all the entries are still in the database. Any help?
2
votes
1answer
2k views

Craft CMS Plugin Save Record to DB from Variable

I am tearing my hair out with this! So, I have a variable file setup as follows <?php namespace Craft; class TrackrVariable { public function startTrace() { if(!isset($_COOKIE['...
2
votes
1answer
226 views

db password problem

i've got this error: [error] [exception.CDbException] SQLSTATE[HY000] [2000] mysqlnd cannot connect to MySQL 4.1+ using the old insecure authentication. Please use an administration tool to ...
2
votes
1answer
110 views

Mysql error when defining related tables

I'm trying to create some relational tables from 2 records but I keep getting the mysql error: CDbCommand failed to execute the SQL statement: SQLSTATE[HY000]: General error: 1005 Can't create table ...
0
votes
1answer
234 views

How do you manage master db across multiple environments? [duplicate]

I've just started my first Craft site locally and it's all good so far.. a little further down the road, I'll need to then deploy regularly to integration/test/stage and production environments. I'm ...
3
votes
1answer
385 views

Entries as Flat Files

Is there any way to have some entries exist as flat files? Considering moving my blog over from Statamic where I have a boatload of Markdown files that work as article entries. It seems like Craft ...
0
votes
3answers
538 views

Host a Craft app

I've just made my first craft application and I'm ready to launch it. After looking at some topics I've decided I should go with DigitalOcean and ServerPilot. I have a domain, the only thing is that I ...
1
vote
2answers
2k views

Need help troubleshooting DB connection

I'm moving a craft install from a development to production server and am getting this error: ERROR ERROR Craft can’t connect to the database with the credentials in craft/config/db.php. I've triple ...
4
votes
1answer
597 views

Incorporating data from an external database into Craft pages

I'm looking at how best to incorporate various sets of data from another MySQL database into a Craft site. Using the Feed Me plugin would be one way, if the data source had feeds, but I'm thinking ...
2
votes
1answer
219 views

How to Use defineAttributes To Specify NOT NULL and DEFAULT '1' in MySQL Record

How to Use defineAttributes To Specify NOT NULL and DEFAULT '1' in MySQL Record I am porting a plugin from another framework and it has the following MySql tables structure. Is there an easy way to ...
1
vote
1answer
867 views

Updating the Database for plugin settings

I have another plugin development question. I am now trying to learn how to work with the database. To that extent, I have the following code: On the templates/settings.html page I have the ...
2
votes
1answer
687 views

Class 'Craft\DbCommand' not found

Getting this error in the PHP error log file while trying to install craft. PHP Fatal error: Class 'Craft\DbCommand' not found The file is there, permissions are granted and I've tried ...
0
votes
2answers
1k views

Can't Transfer Site

I have set up Craft on my local computer and now wish to move it online. However, I am having some difficulty doing this. I have tried this method: Migrating a whole website between Craft instances,...
1
vote
1answer
788 views

How to find and delete with Active Record

I'm trying to learn how to add and delete records using Active Record. This works to add: $instance = new Calendar37Record; $instance->timestr = $timestr; $success = $instance->save(); Given ...
2
votes
1answer
419 views

"Internal Server Error - Cannot find the target folder." When trying to edit an article

Suddenly, when I try to enter an article to edit it, I get the error message "Internal Server Error - Cannot find the target folder." I can't seem to find the reason why this happens, or how to fix ...
1
vote
1answer
1k views

db query to get fields related to entry

Sorry if this question is starting off too abstract. I'm porting a calendar plugin from Textpattern and WordPress into Craft. Basic workflow for the output has been (in twig terms): {% set start = "...
1
vote
1answer
916 views

How to import existing users into database

Ok this is now a general question as I managed to import the user table to the database. Unfortunately it appears that whilst the users all show in the database they do not show in the CMS. Digging a ...
0
votes
0answers
76 views

Craft requires MySQL 5.1, got 5.1.73 and an error

I just moved my website on my production environment, and when I try to login, I get the "MySQL 5.1.0 is required..." So I did a phpinfo() and got Client API version 5.1.73 for MySQL. What did I do ...

1
3 4
5
6 7