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
1answer
21 views

Does storing my database as a .sql file in my site git repository cause problems?

I have been saving a series of database export files each time I do a git commit of my Drupal site. I have a nice git repository for my site files and a messy folder for my database backups. Because ...
1
vote
2answers
51 views

How to get the drupal version using phpMyAdmin query?

How to get the drupal version using query ? Or how do we detect using query the drupal version is 7,6,5 or 4?
-4
votes
2answers
47 views

FLOOD table in DATABASE

What's the purpose of "FLOOD" table in Database of Drupal 7 ? Actually, I want improve performance of my drupal website. So, i am trying to remove unwanted tables in databse & modules.
-2
votes
0answers
12 views

How to make drupal database scalable [on hold]

How to make drupal database scalable and how to optimize the database queries
-1
votes
0answers
26 views

Login with additional Database users table [on hold]

I have connected additional database to drupal by following way $db_url['default'] = 'mysqli://root@localhost/default'; $db_url['additioanl'] = "mysqli://root@localhost/additional"; and I can ...
-2
votes
0answers
22 views

How to save Webforms submissions to my own database

I have used Webforms to create a form. Now I wanna use that input details in a database of my own .. and it should get inserted the way I need, I mean fields and all. So is there any way I can forward ...
-1
votes
1answer
26 views

Can't backup MySQL database due to SQLSTATE[HY000]: General error: 2013 & 2006 [closed]

Every night at 0100 I backup my database. Today it failed with the following error: Info: Initializing SQL dump method Info: Successfully finished dump of mysql database information_schema Warning: ...
2
votes
1answer
34 views

Features - Is there a way to push changes back into the database

I have a fairly good understanding of the way that features works: Make changes to your test site. Create a feature which contains the changes. Copy the new module (which was created by features) to ...
0
votes
1answer
15 views

Easy database reconfiguration for migration [duplicate]

I have build a Drupal site on my local development server and I am preparing to move it to my test server and eventually my live server. I know where to find the database settings in my settings.php ...
2
votes
1answer
18 views

How to get the current active DB in Drupal 6?

You can easily print out the current db_name, by printing out $db_url. But there is no clear way in the API that allows you to print out the "key" for the active db. So I have two dbs, namely ...
-2
votes
1answer
49 views

How to resolve 500 - Internal server error? [closed]

I could not able to figure how to resolve this error i have tried searching on google. Server Error 500 - Internal server error. There is a problem with the resource you are looking for, ...
0
votes
1answer
12 views

Drupal 7 connection to MS SQLServer/PostgreSQL [closed]

I'm building an architecture of an integrated system of databases that are going to be the infrastructure of about 60 websites. since databases are going to be massive (more than 30000 articles will ...
1
vote
2answers
25 views

How to test a database connection?

I'm writing a module that will have to make a connection to a seperate database. In order for the user to configure the database, I'm allowing the user to fill out the database connection info in the ...
0
votes
1answer
12 views

Redirect to page in form submit and use the form data in new page

How to redirect in drupal 7 in form submission, I need to use the submitted data in next redirected page but below video_subtitle_view function is not printing anything How do i do it /** * ...
0
votes
1answer
28 views

How to connect to multiple Databases in Drupal 7?

I'm building an encyclopedia website. There are about 20 subjects that must be stored in the Database (media,library,article,translations,...) and we want to create 20 databases and allocate one DB ...
0
votes
1answer
20 views

Is there any API to get corresponding field in a custom content type?

I have drupal 7 and created a custom "content type" with several fields. just imagine i have: title field subtitle field I need to search the data. I want to search titles and when i found my ...
0
votes
1answer
67 views

How should i get corresponding field value for taxonomy filed attached?

I use drupal 7. I created a content type with these fields: one field to upload a file to private folder a taxonomy field (for that file) my problem: i can save one file with one taxonomy! but ...
1
vote
1answer
48 views

Re-writing SQL statement in Drupal dynamic queries

I have the following SQL query, which I need to re-write using Drupal's dynamic query language. I'm new to Drupal development, could you please give me an example for the following SQL? SELECT ...
0
votes
0answers
17 views

How can I trigger a call to a custom module function before the browser unload event?

I have built a report for an client account that shows payments and charges with totals. I am now adding an export button using the PHPExport module. As I already built the data to display in the ...
0
votes
2answers
35 views

Sync local dev site to live best practice [closed]

What is best practice for syncing a local dev site with a live production site when your live database is constantly changing? From what I have read there are two possibilities: Replicate changes ...
0
votes
1answer
31 views

Why is this db_select not working?

I can't seem to figure out, are you not allowed to chain db_select methods? $nid = db_select("node", "n") ->fields("n", array("nid")) ->condition("f.entity_type", ...
8
votes
1answer
130 views

Recover a deleted field

I have a content-type with 4 fields each of which is a term reference. There are 100 nodes each assigned 4 term references. I have accidentally deleted one of these fields from the ...
0
votes
1answer
16 views

Drush archive-restore not restoring database nor giving error

I have a Drupal 7 site and database in an archive created via Drush. I'm trying to restore it with Drush on a Mac running MAMP. When I tell it to restore the site it says "[ok]" afterwards and the ...
1
vote
1answer
78 views

Connect to Intersystems Cache DB via ODBC

I'm trying to connect to an external data source within out intranet site. The database is Intersystems Cache. Our web-servers are running Cent OS 6.4, so I have setup the necessary unixODBC drivers ...
1
vote
1answer
42 views

How to Display Unique Values from database using db_select in Drupal

i tried with following code but i cant get the attached output $query = db_select('webform_submitted_data', 'u'); $query->fields('u', array('sid','nid','data')); ...
0
votes
0answers
30 views

Webforms - Getting Select Options From External Database - Not Working

I am trying to populate the webforms pre-built option list using a custom module. It works when manually including the values in the module, but when I try to query an external database to get the ...
1
vote
0answers
23 views

In drupal logs I noticed this RS=^ADAOFFfv_qRKIqNqB.eLUt7nCbvHuc- come up as a refused URL request [closed]

In drupal logs I noticed this RS=^ADAOFFfv_qRKIqNqB.eLUt7nCbvHuc- come up as a refused URL request. I realize that it is a bot poking at the site looking for an exploit of some kind. Just wondering ...
0
votes
0answers
8 views

Integrity constraint violation in configuration managment sync

I installed configuration manager and started tracking files. I pushed them with git to another server, and they were pulled and loaded into activestore fine. However, the next time we tried to do it, ...
-4
votes
1answer
28 views

function ā€œLā€ cannot work

I am trying to highlight nids of pages when I am using $nid = $node->nid they stop working of function l in drupal 7 but our nids is highlighted here is my code $ch1=db_query("SELECT th.tid FROM ...
0
votes
1answer
36 views

Simultaneous Database Connections

I have two databases set in my settings.php file. One is used for drupal, one is for our backend which is external from the drupal installation and databases. I would like to query the backend ...
0
votes
2answers
33 views

How to make changes to the database schema?

I am trying to follow edits made in a php file to patch a module and the instructions just say "In your database schema add this", which I could do if I knew where to find the file. When I look up ...
0
votes
0answers
10 views

vchess Base table or view not found

I read the README.txt for this module which says not to install the recommended release because probably run into errors so after running into errors with recommended release with Base "table or view ...
0
votes
0answers
40 views

file_managed table cleanup after replacing content

We have an issue where if we replace content pages on our Drupal site, the files referenced in the content page remain in the database. When we go to recreate the content page, Drupal starts throwing ...
0
votes
1answer
32 views

FetchObject() only return one result

Select query will always return a result set object of one record.. There are several ways to then retrieve data from that result set, depending on the use case. user's flaged entity id: ...
0
votes
1answer
54 views

Uploading an image from a form in my custom module

I am creating a custom module where the user uploads and image to the Drupal DB using a form. All the data except for the file is being put into the DB though. The only thing that shows in the ...
0
votes
0answers
35 views

External Database / Select List Build / Filter

I connect to an external database to display information in a view. I also have multiple fields as an exposed form for filtering the view. One of those exposed fields is "institution." In the drupal ...
0
votes
3answers
58 views

Can't find custom block php code in the database

I've created a custom block in Drupal 7, to display, in the upper right corner on every page, a menu that is context sensitive. Based on certain user attributes some functionalities are enabled or ...
0
votes
0answers
29 views

Interface 'DatabaseStatementInterface' not found - Commerce Kickstart Installation

I am trying to set up Commerce Kickstart distribution on a machine with following config: Apache 2.2.5 PHP 5.5.5 MySQL 5.1.71 Oracle 11g I see the welcome page at ...
6
votes
1answer
100 views

Drupal 7, MySQL, InnoDB, and transactions [duplicate]

I was reading default.settings.php for Drupal 7.x this afternoon, and came across this comment: /* * Some database engines support transactions. In order to enable * transaction support for a ...
0
votes
2answers
31 views

Adding a unique key to Drupal column

I'm just doing a one-off script, but I'm wondering if there's a correct "Drupal way" to alter a table and a unique key. For example, this is essentially the query I want to do: ALTER IGNORE TABLE ...
4
votes
1answer
45 views

I want to get all of the allowed values of a field

Say I have a field in Drupal called resource_type, and I wanted to get all allowed values. Is there any easy way to do this with a command, or do I have to do a database query? I'm not seeing anything ...
1
vote
3answers
62 views

Database Each table Usage

Where can I see the each table usage, which is getting created in default installation of a Drupal site. Likes node table - used to store all nodes in them. For other tables where i can get the ...
0
votes
1answer
55 views

Drupal 7 Views Custom Join in an External Database

I am trying to join two tables in a second database (they are both in the same database, db2). I am trying to join tablename to tablename2 on the field tablename.ItemID = tablename2.ItemID. While the ...
0
votes
0answers
23 views

node_tag_new slow query due to wrong type

Drupal executes this query on page load, taking ~50ms on my server: UPDATE history SET timestamp='1393092425' WHERE ( (uid = '1') AND (nid = '1') ) In the database, timestamp, uid and nid are all ...
4
votes
1answer
126 views

Why do I get a backup file that has three different sizes?

I am using Drupal 7 site on a remote server (bluehost). I cleared the cache before the backup. When I am using the backup and migrate module, and use admin -> config -> back up - the size of the ...
0
votes
1answer
51 views

Accessing data on Drupal with external application

I'm developing a native iOS application for a small company. The company has a career website on which they publish job offers. The contents such as job descriptions and contact person information are ...
0
votes
1answer
49 views

How to extract content from database [duplicate]

How can I extract my content from the database? My specific use case is to be able to migrate my content out of Drupal to do a 100% clean re-installation and then restore all my original content, but ...
0
votes
0answers
29 views

Having a 'key code' to view a certain page

I am currently working on a eCommerce site that is running the latest version of Drupal and the Ubercart module. what I am trying to accomplish is when someone registers to my site they have a ...
0
votes
0answers
25 views

Multiple databases: store users in remote database

I want to have one site with two different databases: one should store users and other should store the rest. Databases are on independent servers. I know that in settings.php there can be several ...
0
votes
1answer
21 views

Where in the table is it stored that /drupal/foo is actually /node/47 in order to mass query to remove /drupal and just leave the /foo part?

/drupal is broken on all the websites, but I want to go into the database and mass query to remove the /drupal and just leave the /foo part.