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

1
vote
2answers
58 views

drupal_mail to users selected from database

In my Drupal 7 site I use custom tableselect form to manage some events. User can review profiles of people who applied for event and approve their participation. I want to send them email ...
0
votes
0answers
15 views

dropdown ajax field not save fileds on databasse

I am trying to create my own module and I'm having trouble saving information in the database. in fact, the values are stored in the database, but the first value of the array (String) (violin) If I ...
1
vote
3answers
95 views

Differences between 'Add existing field' and 'Add new field'

It is possible to reuse the already created fields via Add existing field option. From optimization perspective and the way Drupal stores and manages such fields in database I would like to know, does ...
0
votes
0answers
25 views

Update failed - table doesn't exist

I'm running a D7 core update and all but one database updates pass. The one that doesn't pass gives me the following error message: Failed: DatabaseSchemaObjectDoesNotExistException: Cannot add field ...
0
votes
0answers
15 views

Getting error Fatal error: Call to undefined function _system_rebuild_theme_data()

I am getting this error on a Drupal 7 site on running a cron script from command line. The site is running on multisite configuration having subdomains like http://site1.example.com ...
0
votes
0answers
16 views

Custom tables doesn't appear in adopt table list in Data module [closed]

I've some modules and all of them have a .install file where I create some tables. I'm trying to use Data module to adopt the tables, but It doesn't appear in the 'orphaned tables' list. Is there a ...
1
vote
3answers
18 views

Error after transfering process to a new host

I transfered my website to a new host and I am seeing this error: PDOException: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'teise1_katalogas.system' doesn't exist: SELECT name, ...
1
vote
2answers
32 views

Outside Database

I have an outside database called "panels" that stores our company articles/blog posts/products etc... in it. Is there a good module to use, or I could write a custom module to hook into the outside ...
0
votes
0answers
16 views

Insert “uuid” in “users” table

I am building a web-service which will register user for my drupal site from android device. For Registration I am inserting data in the 'users' table of Drupal database. But the problem occurs with ...
0
votes
0answers
21 views

Combine results from two views with working pager

I'm looking for how to combine two views with working pager. I've searched a lot but all examples are for db_select or without pager. I have a node type "Company" with fields: "Main Category", term ...
0
votes
1answer
21 views

Overview & help with drupal files and folders on Win 7

I am a newbie. Please forgive me if this is a dumb question. I'm trying to wrap my brain around what is Drupal and how it works. I installed Acquia Dev Desktop successfully on my Win 7 computer. I ...
0
votes
1answer
25 views

Between Query is not working

My query is like so: $result = db_query("SELECT nid as id,created as start,title FROM node WHERE (created BETWEEN '1430134906' AND '1430129127')"); foreach ($result as $record) { ...
0
votes
2answers
25 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
23 views

Drush won't use password for DB connection; how to set it to use password and define password?

I can't figure out why and where Drush is set/configured not to use password when connecting DB. For instance I was trying setup a quick site e.g. command drush qd which gives: PDOException: ...
1
vote
2answers
29 views

Fetch data from database and show in custom block [closed]

I have created my own simple block.I want to show some data from user table of database of logged in user to the block.I want to show it programmatically and not want to use any module. How can I do ...
0
votes
2answers
18 views

Message “No pending update” after update.php (update module)

Today I updated the security update for the "views". I always follow the steps for updating a module or core: 1) put site in maintenance mode 2) FTP the files 3) go to link site/update.php But ...
0
votes
0answers
12 views

Database scheme inconsistant warning

I'm not familiar with troubleshooting this type of error I'm seeing in the status report screen. How should I proceed?
0
votes
1answer
37 views

Two drupals sharing users, news and products [closed]

I have an installed and well configured drupal with over 100 of users, news and an ubercart with 3000 products. I would like to create a subdomain where I have the same user base and contents (news ...
0
votes
1answer
21 views

How do you get a node ID from an order in ubercart?

How do you get a node ID from any of the products in an ubercart order? I'm trying to get the product author's (uid) from the order as shown below The order will only contain nodes/products by the ...
5
votes
2answers
48 views

Best practices for copying data (only) back from production site to testing site after exporting views as features to prod?

After building/testing a Drupal 7 site, I deployed it to prod server, exporting all views as features. Now the views are all 'in database' on test site, but 'in code' on live site - on the theory that ...
1
vote
0answers
37 views

how to store all fields for specific content type in one table [closed]

i would like to create content type which uses my own custom table and query it using views. for example: i have table tblCars(Year,Make,Model) in database now i would like create content type Cars ...
1
vote
0answers
28 views

Successful Query Result but Unable to Display Results

I'm expecting one row query result in my query commands below: //Retrieve ID Preview Information fom the database $query = db_select('student', 't1',array('target' => 'import')); ...
1
vote
1answer
29 views

AWS RDS and Multiple Database Installation

Does anyone have experience with setting up a Drupal Multi-Site with multiple Databases onto one RDS instance in AWS? I was looking into this link below but I was not familiar with the exact ...
0
votes
0answers
8 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
18 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
39 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
22 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
40 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
33 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
21 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
27 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
36 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
39 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
27 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
11 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
53 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
26 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
34 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
0answers
27 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
42 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
14 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
181 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
17 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
28 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
24 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
41 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 ...