MySQL is an open-source, relational database management system. Use this tag for questions specific MySQL, not for saying "I am using MySQL."

learn more… | top users | synonyms

1
vote
1answer
17 views

How are node and field tables related in MySQL?

I am working on a query that involves the field_data_body Drupal table, and I have been asked to return corresponding node ids for the relevant rows in field_data_body. However, after reaching a copy ...
0
votes
0answers
13 views

Need to fire SET & complex query using db_query

How can I process following query structure in drupal 7. set @num := 0, @termid := 0; SELECT * FROM (SELECT tid,nid,created, @num:=IF(@termid = tid, @num + 1, 1) AS row_number, ...
0
votes
1answer
25 views

Using SQL to output link to a node

Does anyone know - using SQL only - how to output the link to a drupal node? If I was using PHP I think it would be something like this: print l($node->title, 'node/' . $node->nid); But I'm ...
0
votes
0answers
10 views

Why are we using utf8mb4_general_ci and not utf8mb4_unicode_ci?

Drupal is moving to support utf8mb4, however, it is using utf8nb4_general_ci. Why take the time to move over to support it, and then not fully support it? Is there a specific reason, or just ...
0
votes
1answer
13 views

migrating from postgresql 9.1 (non drupal) to Percona Server 5.5 (drupal 7)

We decide to go from a perl website to drupal 7 (PHP 5.5.23). My big question is how do i migrate the DB which is PSQL 9.1 to mySQL. I've heard of the the migrate module, drush, MySQL Workbench. ...
0
votes
1answer
11 views

How to get each db result value count

How to get values count in db_select My query is: $last_item = '2015-07-19'; $query = db_select('field_data_appointment_date','ap'); $query->join('field_data_appointment_slot','aps','aps.entity_id ...
0
votes
0answers
11 views

Umlauts grouped in summary (U and Ü, A and Ä etc)

I faced the problem with summary attachment which includes umlauts like: U and Ü, A and Ä; O and Ö etc. For example if two nodes starting with letters U and Ü Umlauts Ümlauts only U letter will be ...
0
votes
4answers
45 views

How can I run cron.php via crontab?

I'm trying to run cron.php via a cron job set up in crontab on my server via the following command (running every 2 minutes purely for testing while I try and get it working - it will be every 6 hours ...
1
vote
1answer
26 views

Using Cron and CURL in a custom module

I am using a hook_cron (mymodule_cron) in my custom module, but would like to know whether the cron run is successful or not and has sent the data using CURL, and from there, update a specific column ...
1
vote
3answers
37 views

PDOException: SQLSTATE[42S02] - Base table not found

So I am in a bind and have no idea where to go. I get the following message now after I tried to add a new field to a content type: Error message PDOException: SQLSTATE[42S02]: Base table or view not ...
0
votes
1answer
25 views

How to insert data into node and other tables at the same time?

I create a Drupal module which install database tables during module installation, table is created using Drupal way. The tables are created perfectly and now i have to insert data into those tables. ...
0
votes
1answer
17 views

Automated database history save and recovery Drupal 7

I have a site implemented in Drupal 7. I want to make a history database recovery tool, which will recover previously recorded MySQL data. I have tested correctly on non-Drupal content which is used ...
0
votes
0answers
27 views

Help sending specific fields' values to external url from Drupal webform

I have the following codes in webform remote post module, but instead of sending the whole webform fields as it is being done in the module, I need to send data from the fields only present in a ...
0
votes
0answers
18 views

drupal retrieve csv field values from sql table to post to url for webform

I have a scenario in Drupal 7 which is as follows, and need to eventually post the webform values to an external url: I have created a custom module which allows me to select a webform (based on the ...
0
votes
0answers
15 views

how to get unquoted value from $join-extra in views_query_alter

We use join->extra to specify a 2nd field in a join condition; this works fine when the value is a literal, but not for field references, which is returned as a quoted literal. For example a join ...
0
votes
1answer
36 views

How to resolve the MySQL error Duplicate entry 'comment_publish_action' for key 'PRIMARY'?

I'm a beginner in Drupal. I want to import my database to my webserver and get this error when trying to do so: "#1062 - Duplicate entry 'comment_publish_action' for key 'PRIMARY'" I don't know ...
0
votes
1answer
24 views

Is this SQL query even possible in Drupal 7?

I'm trying to find a way to run this query in a custom drush command to dump chunks of data from the DB into CVS files. The query works fine directly in the terminal but I was wondering how would ...
1
vote
1answer
61 views

How to access an external MySQL database in a view if SQLite support is not installed?

I would like to display other MySQL database by Views, and having the similar situation as this question. Except, I'm not able to enable the "SQLite", because I have no control on the server end. ...
0
votes
1answer
48 views

How to resolve my timeout during import of my Drupal database using phpMyAdmin? [closed]

I downloaded my Drupal database (in MySQL format, and using phpMyAdmin) from my new web site. I am attempting to import it using phpMyAdmin on my local Win 7 computer running Acquia Dev Desktop. It ...
0
votes
1answer
10 views

What is difference between field tables?

What is the difference between a content_field_myfield and field_data_field_myfield in the db?
0
votes
0answers
10 views

Error while instaling Drupal 7 [duplicate]

Please help about below error. i don't know how to resolve below error. i will try several ways follows from google search and drupal.org forums. but error still comes. please check the below image ...
1
vote
2answers
27 views

How can I build a contact form which will save its input to MySQL?

How can I build a contact form which will save its input to MySQL? Is there any relevant module you'd recommend?
0
votes
0answers
29 views

Error while adding any field in custom content type [duplicate]

I am unable to add any field in my custom content type, when I click on save button or click on upload after adding images it gives me the following error and for the text field the error is simply ...
0
votes
0answers
21 views

Add multiple conditions in search

I want to add two conditions in drupal core search. First condition contains taxonomy term parent and second condition contains taxonomy term child value. I have developed an interface now i want to ...
0
votes
1answer
40 views

I can't fetch anything else than '1' to my PDO query

Here is my PDO request : $query = db_select('review_ratings_table') ->fields('review_ratings_table',array('review_nid')) ->condition('loc_id', $loc_id, 'LIKE') ...
1
vote
3answers
86 views

Where is the base domain stored in database D7

Is there an equivalent row to the Wordpress "Home" and "Site"? In otherwords, where can I look in the database to figure out what the domain the site is on? I'm using mysql
0
votes
2answers
35 views

Why doesn't the field table in the Drupal database use entity_id as a primary key?

I'm working on trying to optimize a View SQL query and I noticed that the query being executed is using a join on a the entity_id field of a field table. I noticed that for some reason unbeknownst to ...
0
votes
0answers
28 views

GENERATE PDF WEBFORMS DRUPAL [duplicate]

I istalled webform2pdf and tcpdf for download forms and i create form i cconfigure webform2pdf but when i Click in download pdf on the form that i was created i have a error say : Fatal error: Call ...
0
votes
1answer
131 views

Fatal error: Call to undefined function system_run_automated_cron()

I migrated my database from oracle to mysql and when linking it to my drupal the following error: Fatal error: Call to undefined function system_run_automated_cron() in ...
0
votes
0answers
21 views

cpu at 100% after ubercart database update

Recently I updated ubercart tables of my database with newer ones. Now if I want to search for an existing customer inside the order based on email, cpu goes to 100% for 2 minutes freezing whole ...
1
vote
0answers
15 views

From a slow mysql query, is there a way to determine which Drupal module/path is the cause? [duplicate]

My hosting provider (Pantheon) provides mysql slow query logs. Is there a quick/easy way to determined, based on an entry in the log, which module/path is causing the problem? Since I built this ...
1
vote
2answers
66 views

How to subtract two columns with db_select()?

I have a db_select query that outputs two columns. I want to find the difference between these columns, output to another column, and then put a condition on this third column. Here is a mysql query ...
1
vote
0answers
48 views

Connection timed out and lock_may_be_available() on working site

I'm hoping someone can point me to a fix. My drupal 7 app was running fine locally this a.m. while I was testing a way to insert a row using mysql tools for a non-Drupal function. My environment is ...
1
vote
1answer
73 views

connect drupalgap app to drupal site

i have a problem and the documentation of drupalgap is not too specific. I have a site for example "www.mysite.com" and i have in a localhost a site built in drupalgap that i want to connect with ...
0
votes
1answer
100 views

Can't use drush site-install to drop tables and reinstall in MAMP

I have a local multisite instance running MAMP 3.0.7.3, and I can't use the drush site-install command to do a re-install of one of my sites without actually dropping the database first. If I try the ...
2
votes
0answers
56 views

site down due to mysql error but returns 200/OK

A site I help administer was showing a MySQL error page, Additional uncaught exception thrown while handling exception. PDOException: SQLSTATE[HY000] [2002] Can't connect to local MySQL server ...
0
votes
0answers
30 views

creating book hierarchy via mysql inserts

I have imported data from other sources into drupal 7 creating nodes and node revisions with MySQL inserts. I wish to use books module to structure some of my content, and trying to achieve it with ...
0
votes
1answer
55 views

Analyzing slow mysql querries

Our Drupal site has recently started to get much more traffic and often pegs the CPU and memory when we have 50-100 active connections. We have 8cpus and 16GB of RAM. I notice that when the cpu is ...
0
votes
1answer
105 views

Install fails using MAMP – SQLSTATE[HY000] [2002]

I've been trying to set up a local installation of Drupal (I've tried both 7.35 and 8.0 beta9) using MAMP on Mac OS X 10.9.5, but evrytime I get to the "Set up database" part of installation process ...
2
votes
1answer
76 views

Not possible to drush sql-sync sqlite to mysql pragma

I have a local testing setup where I can create drupal sites easily, all running with a sqlite DB. I want to (firstly) publish the site to a remote server using a script that calls drush sql-sync ...
1
vote
2answers
239 views

mysql errors after upgrading php and mysql

recently upgraded server to php 5.6.5 and mysql 5.6.22. running drupal 7. after the upgrade we started having issues. the server seems to run well for a week or so before starting to throw error ...
0
votes
1answer
57 views

How could I do a FULL OUTER JOIN in drupal?

How can I do this code in Drupal? I cannot find how this code is writing in Drupal. SELECT column_name(s) FROM table1 FULL OUTER JOIN table2 ON table1.column_name = table2.column_name;
0
votes
1answer
17 views

How to restrict a page to a group of people?

I am trying to figure out how I can lock down a page (part of my site) to a list of users that I have in another MySQL DB. Ideally I would like to call the DB and see if the user has access each time ...
0
votes
0answers
31 views

Concat query used in a like condition

I'd like to perform a query where I get the value of various fields(stored in different tables) and check if a string exists on them. This is part of a bigger query. What I did until know is : ...
0
votes
1answer
36 views

how do i install drupal with drush

First off, I'm a drush newbie, just installed it and now I want to install drupal on my server, so I did a drush dl drupal --drupal-project-rename=Quaaoutand next I want to do a drush si standard ...
0
votes
0answers
15 views

Recurrent error MySQL writing to /tmp

Need some brains to point me in the right direction please. I've been having a problem with a legacy Drupal 6 set up, recently it has started erring with the following Can't create/write to file ...
0
votes
2answers
43 views

Batch deleting nodes breaks database

On my Drupal site, I have about 100 nodes that need deleting. I have deleted them via Views Bulk Operations. When I do this, if I make a backup of my site MySQL database and then try to restore it ...
0
votes
0answers
205 views

db_select sum operation of multiple tables column

I have two tables table 1 is table 2 is I need sum of points and sum of pur_amount of each uid as per the vuid Here is my code $query = db_select('table1', 'pp'); $query->join('table2', ...
0
votes
1answer
65 views

Does Drupal cache db_query results for multiple users?

I am running into something strange and perhaps someone here can help me. I am trying to prevent two things from happening at once because the second attempt might be influenced by the first attempt. ...
3
votes
0answers
101 views

Drupal Commerce causing database deadlocks

I'm trying to get to the bottom of a known Drupal Commerce bug to do with row locking. When a user logs in on my development site, Drupal Commerce starts multiple identical queries that look like ...