If the question is about SQL queries, consider using "sql-queries"; if the question is about the database API, use "db-api."

learn more… | top users | synonyms

0
votes
0answers
4 views

How to rename system name field_name without deleting field, without losing data from db? [duplicate]

I have a field_trademark. 400 nodes have this field filled. I want to rename it to field_brand . How to do this without losing the data?
0
votes
0answers
10 views

Content type field update error in drupal 7 [on hold]

I have been following the tutorial https://www.youtube.com/watch?v=eZWQQh424J. When I Save the geometry type as Geometry collection Im getting the following error. Attempt to update field Geo failed: ...
1
vote
1answer
12 views

Where does Drupal 7 store information about active blocks?

I have encountered a bug where I have deleted a menu block that I created. The block is gone but apparently it didn't clean up after itself properly and there is some residual information about ...
0
votes
0answers
14 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
1answer
27 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 ...
1
vote
1answer
17 views

How to search and replace content type (system)name in database for product types

Using Commerce kickstart, I wanted to replace the existing example content type names with other names. I downloaded the database, applied a search and replace, and after uploading the database and ...
0
votes
1answer
24 views

How to find an article title for specific post

So, I am new to drupal, and I am using a small pdo library to directly fetch from database list of articles, to display them on a page that is not running drupal. But, the articles are posted using ...
2
votes
1answer
31 views

How can I save/load my Entity from a different database in Drupal 8?

For a custom Drupal 8 module I am integrating data from a separate database (other than the default drupal database) by defining a new Drupal entity in my module. How can I configure my Entity class ...
0
votes
2answers
22 views

Can't insert data to database on form submit

I am trying to insert some datas into database table on form submit like this: function form_example_submit($form, &$form_state) { if ($form_state['values']['select']=='1') $gender = 'male'; ...
-1
votes
1answer
17 views

Can't create table when installing module

I have a simple 'form_example' module and I want to add a database table when instaling module. I created this form_example.install file: <?php function form_example_schema() { ...
0
votes
0answers
23 views

What is the basic structure required to create a custom database driver?

I need to create a custom database driver, and the documentation was never completed. Can someone provide a list of the classes that need to be implemented to realise this, and a brief description of ...
0
votes
2answers
30 views

drupal site is really slow on VPS server

I have a drupal 7 website on a VPS server with the following specifications: Processor Name: Intel(R) Xeon(R) CPU E31270 @ 3.40GHz Processor Speed (MHz): 3392.294 Total Memory: 3924628 kB Free ...
0
votes
1answer
37 views

Where should I put my entity queries?

I would like to create a number of entity query methods/functions that I can have easy access to from my entity handlers and controllers. With Doctrine 2/Symfony 2 you can just attach such methods ...
0
votes
1answer
22 views

Custom views query - pager dosn't work

I am trying to modify view query, basically I build my custom query and assigned it to: $view->build_info['query'] = $query; $view->build_info['count_query'] = $query; everything has been ...
0
votes
1answer
8 views

Website encountered unexpected error - how to avoid?

I'm having that typical problem of Website encountered unexpected error popping up sometimes and then after repairing watchdog MySQL table it all works find again. My question is if there is a module ...
0
votes
1answer
32 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 ...
1
vote
3answers
23 views

How to keep the size of the database reduced?

I found out a very simple D7 site with less than 150 nodes had database dumps of 65M (gzipped). Which caused my entire server to become slow during the nightly database dumps. After some searching I ...
0
votes
1answer
23 views

Deleted content returns over and over again

I have a situation where I can delete (update options > delete selected content) in admin > content...and it says it deletes all the selected records. But then later on all those records will return ...
0
votes
1answer
27 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;
-1
votes
0answers
8 views

without join i take the values that i want, with join i take not one value

// Begin building the query. $query = db_select('watchdog', 'wa'); $query->join('blabla', 'b','wa.wid==b.wid'); $query->orderBy('wid') ->fields('wa', array('variables', 'type', ...
0
votes
0answers
21 views

how to validate duplicates multiple fields drupal form registration?

$query = db_select('users_roles', 's'); $query->join('field_data_field_parent_email', 'p', 'p.entity_id = s.uid'); $query->fields('p') ...
0
votes
1answer
35 views

where is the fault in my join?

$query = db_select('watchdog', 'wa'); $query->join('distinct', 'di', 'di.wid == wa.wid') ->orderBy('wid') ->fields('wa', array('variables', 'type', 'severity', 'message', 'wid', ...
1
vote
1answer
20 views

All database settings are set to 'A'

I'm encountering a very weird problem where my database settings look like this in database.inc:openConnection() array(1) { ["default"]=> array(6) { ["driver"]=> string(1) "A" ...
1
vote
1answer
26 views

programmatically create one bean block to the default theme

I am trying to programmatically create beans in a custom module using entity_metadata_wrapper. This is creating a bean for each installed theme. (In Drupal 7) Is there a way I can create only one ...
0
votes
0answers
6 views

join two tables and take 20 distinct values without the use of “distinct()”

how i can join 2 tables and keep the first 20 different values in the table?I create a table with no values on module installation: function distinct_schema() { $schema['distinct'] = array( ...
1
vote
6answers
153 views

Fetching drupal articles, tags, image directly from database [closed]

I have been playing around with Drupal 7 for the past 3 days, as a first-time user. I don't have any problem so far with posting, editing and privilege maintenance. However, I am using drupal for a ...
1
vote
0answers
16 views

Is db_next_id() thread safe?

My problem: Say, I need to run a massive amount of inserts into two related tables: Table1: id1, data1 Table2: id1 (foreign key), id2, data2. I want my code to work fast, so I can't run a loop like ...
1
vote
1answer
24 views

with limit(20) it runs only the first 20 values of DB

In this lines of code it selects only the first 0-20 but i want the first time select the first 0-20 and then the other(20-40) and other(40-60) and so on. How I can solve this problem? function ...
0
votes
1answer
20 views

Create a module to access a 3rd party API and store the keys in the database

I am new to Drupal module development, and have searched but haven't found any tutorials or guides on how to create a module to do the following: Access a 3rd party API via a form Store the user ...
0
votes
1answer
37 views

WSOD with error when login as administration

I was working on website and suddenly noticed that a particular page had a error message and lost a lot of css styles. When I went back to the back-end I saw a white page with following message and ...
0
votes
1answer
13 views

db_select get all results count when also using a pager

Is it possilbe to get the count of all rows, when using a pager in a db_select query? My pager is the following: $query = $query->extend('PagerDefault')->limit(20);
0
votes
1answer
23 views

Store mysqli-connection object in cache

I have some code in a drupal 7 site that makes repeated requests to an external database using mysqli. To speed up the code, I was hoping that I could store the mysqli-connection object in the cache, ...
0
votes
2answers
44 views

Load The Drupal Database Schema in PostgreSQL

I was following the tutorial in the link below to install Drupal 7 with PostgreSQL. http://pgedit.com/install_drupal I'm stuck with step 3. 3.Load the Drupal database schema Your Drupal ...
0
votes
1answer
16 views

How to migrate users from one website to another website?

I created a Drupal Kickstart site and when updating I created another test site. During the updating process my older site has new members and orders how do I transfer the new database tables to ...
0
votes
2answers
41 views

How do you get DRUPAL_ROOT when using it in a separate php file?

It has been covered many many times on several sites, explaining how to define DRUPAL_ROOT and bootstrap the page (whatever that actually means). However no one has ever said how to use it in a ...
0
votes
2answers
24 views

Download DB in Admin panel

How to download my drupal site DB in my Drupal 7? I want to know is there any options are there in download db in admin panel.
0
votes
1answer
20 views

Database corrupted getting the site crash

I crashed my website trying to secure it by changing files and folders modifications...After i tried many things (chmod 777 -temporarly- all to take it back, clear the cache, drush rr...) nothing ...
2
votes
1answer
40 views

Migration taking increasingly long periods of time

I have a migration and I've noticed that the code, through each batch operation, seems to process less and less items. For example, the first few cycles, it'll say, "processed 600", and 600 or around ...
0
votes
3answers
15 views

Drupal database connection

Is it necessary to connect to drupal database in order to fetch something from database? OR no if I have drupal installed so no need to make connection in any template file in order to fetch data?
0
votes
1answer
15 views

fetching taxonomy tree from database from query

I add a vocablary named "product sub categories" and I want to fetch the whole tree structure from datebase through query? Can anybody can help me?
0
votes
3answers
47 views

French accented characters not saving to database

I have created a module that reads in a csv file that has french accented characters in it to create nodes from. The creation of the nodes seems to work fine but when I execute the node_save() command ...
0
votes
2answers
29 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
2answers
25 views

What is cache_menu in Drupal 7 DB? Safe to empty?

What exactly is doing this cache_menu table in MySQL Database of my Drupal 7? It is the hugest table of all = currently 308 mb.... (and I have disabled search term indexing, so this is absolutely ...
0
votes
1answer
28 views

Where are templates from hook_theme stored in the database

I have a module, called "bundles", there I created a file "attached_email.tpl.php" and a hook_theme: function bundles_theme($existing, $type, $theme, $path) { $path = drupal_get_path('module', ...
2
votes
2answers
35 views

How do I export all of my customers (not users) from Drupal into a CSV file?

I'm working on integrating a new accounting system and crm (Xero & Capsule) for a client - and they have just under 10,000 clients - only stored in their Drupal website. I need to export these ...
0
votes
1answer
27 views

What Drupal tables to export from broken site

I'm on localhost with Acquia Dev Desktop , Drupal 7.34. Php 5.3.29. I was just playing in the Views when suddenly the site crashed. After few drush cc and restart of Acquia Dev Desktop and trying to ...
0
votes
2answers
82 views

Restore hacked website from database without source

I have a database backup from a hacked drupal site. The source code of the hacked website has been lost. When I try to make another installation of the site working using the old database, I have the ...
1
vote
2answers
141 views

First page load/execution slow, login slower Drupal 7

Drupal 7 site experiencing slow execution/load time for first page visit and slower execution/load time for login. The web server and database servers are dedicated and well resourced, the site has no ...
0
votes
1answer
88 views

Drush unable to bootstrap to database

I am not able to get drush to work properly: 1) I can download modules & themes through drush but I cannot enable them (more details below). 2) Also I cannot use the omega commands even though ...
0
votes
1answer
27 views

how to update my custom table after execution of rules

i have created a table as follow <?php /** * @file * Implements hook_schema */ function core_sms_schema() { $schema['core_sms_details'] = array( 'description' => 'This table is used ...