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

What is the correct procedure to restore database in Drupal 7?

Reverting to a former database has been a tricky business with error messages and problems cropping up when I try to re-install modules that were installed or re-create content types, or re-do ...
1
vote
2answers
50 views

How To Deal With Datebase Size?

I'm using domain access sharing the same database for 6 different sub domain websites My concern my database limit is 1000MB Is there a way to create new database set to a limit for example every ...
0
votes
2answers
12 views

Some user images switched after upgrade

I'm working on an upgrade process, and I've noticed something strange when I upgrade my D6 site to 7. I've noticed some behavior that's kinda odd, and was wondering if anyone one else had experienced ...
1
vote
1answer
49 views

How to export private images from Drupal

I want to export private images from Drupal to an external client. How to I authenticate an external client to access private files from Drupal DB?
0
votes
0answers
25 views

problem in saving Account settings [Email template]

when i tried change some words in email template that was sent when user register in the website or canceled or verified or ... etc after i change it i have an error in saving it i tried to build ...
-1
votes
0answers
21 views

self join query in drupal db_select() [closed]

Suppose I have a query SELECT * FROM msg where sender = receiver In which sender and receiver are two columns of the msg table. The query works fine. Now my question is : Is this a self join? I ...
0
votes
0answers
16 views

Creating an entity reference in a custom entity

I have created an entity that I want to collect data with from an external source and I want to reference that data to a node. How should i set up that entity in DB so it can properly reference a ...
0
votes
1answer
17 views

Custom DatabaseConnection driver does not get found by drupal!

I need to customize a method on the DatabaseConnection_sqlsrv (MSSQL) driver, so i created a new driver class called DatabaseConnection_sqlsrvseed and extended all depended classes from the *_sqlsrv ...
1
vote
1answer
23 views

Is the database table “field_revision_body” used in a core module or can I just drop it?

I recently installed the revisioning module and now im cleaning it up and uninstalling it, but it seem to have created a bunch of field_revision_field_ tables in my database. Since it creates another ...
0
votes
2answers
21 views

How to create complex conditional clauses / queries?

I've been reading the documentatoin on conditional clauses and also studied the api description for db_and() and db_or() but I fail to create a $query with 3 ->conditions: select all between 0 ...
0
votes
0answers
17 views

A second database issue This only works with two databases of the same type

I have an issue with a form, I asked one question but actually found i should be asking. I want to create forms that submit data to a postgresql DB, i cannot change the drupal site to run this way. ...
1
vote
1answer
56 views

How to change the database drupal forms send to

It's super easy using php and SQL but how do you change the default database drupal 6 saves posted data in the forms? To an external database?
1
vote
1answer
21 views

Reseed next Drupal User ID (UID)

Is it possible to modify the next User ID when creating new users in a Drupal 7 database? As an example, I have a user at UID 100, I then create and immediately two user accounts (101, 102). When I ...
0
votes
2answers
51 views

Pass info from page link to form

I am trying to build a custom module that uses a theme page to display a list of items withing a table. Each item has a unique ID. and I would like to have links within this table so that my users can ...
0
votes
0answers
21 views

settings.php - table prefix for field tables

How can I set a prefix for a custom drupal field in settings.php? I've tried 'field_data_my_field' => 'prefix_' but it doesn't seem to work. $databases['default']['default'] = array( 'driver' ...
1
vote
1answer
19 views

Manually changing URL alias values via phpmyadmin? What does this affect?

I have a bunch of aliases in my url_alias table. I want to change the source of certain rows, but I'm not sure if it would affect anything. What I need to know is if the column PID in the url_alias ...
1
vote
2answers
36 views

content type or normal er table, that is the question

I was wondering, when should a drupal developer use normal er table instead a new content type? Is it never? When expected node entries reaches 100 000? i googled it and i didn't find any good answer. ...
0
votes
1answer
39 views

How to 'SELECT FROM {entity_bundle} WHERE field_A + field_B <= given_number_X' with EntityFieldQuery

$query = new EntityFieldQuery(); $query->entityCondition('entity_type', 'node') ->entityCondition('bundle', 'MYCONTENTTYPE') // Now say for instance I would like to grab the value of // ...
2
votes
2answers
49 views

Where can I tell if my Drupal 7 database is using InnoDB?

I have a Drupal 7 site and was wondering how can I tell if my database is using InnoDB ? If its not using InnoDB, would I be able to just switch over easily? I just recently switched to MariaDB if ...
0
votes
1answer
49 views

How to get values of delta field from “block” table in drupal 7 from the database for the activated theme in a custom module?

Can I get all the values of delta field from "block" table from the database in my custom module I have tried with this code as clive has explained it here but it shows me an error: $query = ...
1
vote
1answer
72 views

Drupal db_select - How to combine UNION with LIMIT properly?

I'm trying to get content from database divided by category. I want strictly max 4 entries of type "people" and 4 other entries of type "organization". I tried to do it like that: $query = ...
0
votes
0answers
20 views

What does the session column in the sessions table actually hold?

Title says it all basically. The documentation in the install hook for the sessions table says the session column holds "The serialized contents of $_SESSION, an array of name/value pairs that ...
2
votes
2answers
32 views

SelectQuery::fields and Drupal's naming conventions - how to make it all match?

Convention for database column names is underscore_notation. Convention for class properties is camelCaseNotation. But when I'm using SelectQuery::fields('t') and then fetchObject(), fetched object's ...
1
vote
1answer
48 views

RDBMS-independent way to get table primary key?

Let's assume we have Drupal instance with second database connection. Tables in that second database are shared between many systems and thus was not created using Drupal's schema functionality. How ...
4
votes
2answers
87 views

SQL query the Drupal way, complex SELECT, conditional aggregate

I'm starting to invest time in learning custom Drupal entities like the ones explained here and I want to make sure that I am going to be able to do something in the future. I am working with Drupal ...
0
votes
1answer
17 views

How to print all the elements of a specific column from a table from database in custom module?

I have a custom module. I would like to see all the blocks in it . For that i have written a query in my costom.module file . But it will show me the following error. Query:- $result = ...
2
votes
3answers
116 views

How can I get the machine name of a taxonomy term knowing its tid?

Is there any table in the database that shows the relationship between vocabulary and taxonomy, or is there any way to find out the vocabulary name of a particular taxonomy from its tid?
3
votes
2answers
159 views

Best method to clean up database table orphaned data in Drupal 7?

Currently my files and images table has over 100k entries, but I know for a fact that alot of them are orphaned and the files do not exist anymore. What is a best method to cross-reference this data ...
1
vote
1answer
42 views

db_insert() returns wrong key

I'm trying to migrate from drupal_write_record() to db_insert() / db_update(), but db_insert() returns a weird key instead of the last inserted key. On an empty table, I'm doing an insert, and ...
1
vote
1answer
32 views

How to automate database table access as objects and provide common operations, like CRUD and views integraion?

I think this is a pretty normal use-case: Developer has a database. Tables and columns have meaningful names and helpful comments, possibly also sane set of relations. Now he needs a module to be ...
0
votes
1answer
26 views

MSAccess to SQLite install of Drupal and setup Custom Content Types?

I'm looking for information on how I could use or import a msaccess database into a SQLite install of Drupal 7. Is this possible or will I have to export the MSAccess tables to CSV or something and ...
0
votes
2answers
45 views

What items in the DB do I need to edit when switching from a multisite to a single site? [closed]

I've copied a single site from a live multisite setup to my local (MAMP) server. The content is showing from the site however it is unstyled (and also the home page is showing the 404 page). I assume ...
2
votes
1answer
88 views

why some PDOException errors are displayed in details on users screen and some other not

A user reported to me seeing the following error on his screen: The watchdog entry for this error looks like this: PDOException: SQLSTATE[HY000]: General error: 1205 Lock wait timeout exceeded; try ...
1
vote
1answer
92 views

Drupal 7 - Login with external Database

I want my users to be able to login into Drupal with an external user database. I searched for a long time and don't get any module/trick/whatever that is out there. Please help me a little, I'm new ...
0
votes
1answer
180 views

PHP Fatal error: Cannot call overloaded function for non-object in /var/www/html/includes/database/query.inc on line 331

We have a Drupal 7.12 Setup in production. Recently we upgraded PHP to 5.4.10 and we are getting the following error, PHP Fatal error: Cannot call overloaded function for non-object in ...
0
votes
2answers
102 views

Drupal 7: DAL - Using db_insert creates duplicate records

I am doing a simple insert query using the db_insert call and no matter where I try this I am getting the same result, is this an error with the Drupal 7 DAL or am I doing something wrong? The script ...
-4
votes
1answer
72 views

How can I upload a Drupal Website into Wampserver [closed]

Someone built me a website a year ago. I want to upload this website into a local wampserver so I can make changes before going live. I need step by step instructions on how to upload the files. ...
0
votes
0answers
65 views

How to optimize this query generated from a View?

In a D6 site, I log queries and get this monster frequently in the MySQL slow query log: Query_time: 13.817393 Lock_time: 0.000261 Rows_sent: 1 Rows_examined: 3655810 SET timestamp=1366964215; ...
2
votes
1answer
41 views

Internal Server Error? Why is this happening?

All normal to start my website, but to click on any of the links, menus, etc, I get redirected to this with the following message: Internal Server Error The server encountered an internal ...
2
votes
2answers
73 views

Trying to Understand Where I am Going Wrong Modifying User Registration Form

I am working with Drupal as part of a student project. As background, I work professionally doing front end development and I've taught myself at least the basics of the back end. Here's my problem, ...
0
votes
0answers
13 views

Database Showing Comments as Deleted

Hello i have recently changed domains and ..well it cant be related can it? anyhow all my old comments are not showing. When i went into the database via phpmyadmin i notice that the deleted coloum ...
2
votes
2answers
129 views

Automate clear of mysql database in drush site install

Is is possible to automate clearing the database when I run site install? e.g. here is my drush command: drush si geoslate --db-url='mysql://root:root@localhost/geo_test' --site-name=Geoslate But ...
0
votes
0answers
42 views

Anyone using memsql? [closed]

Memsql claims to be the fastest DB on earth and it is compatible with MySQL, so apparently you can migrate MySQL data over to Memsql. So I am wondering whether Memsql is compatible with drupal? and if ...
1
vote
3answers
226 views

PHP in database: bad practice but

Lots of times here I've been told that using views custom php fields, filters or others is a bad practice, because putting php in the sql is dangerous. My question is, if you only call to a function, ...
2
votes
2answers
102 views

how to choose a db for a drupal 7 site?

I have a question which is so basic I'm embarrassed to ask it. I am NOT a developer or DB guy but a webmaster who has manipulated mysql successfully for several wordpress sites. I know how to use ...
1
vote
1answer
228 views

Cache Form table size is enormous

Cache table's size had increased to 10+ GB last month, and I had fixed it temporarily by truncating it. Last time I checked it was around 1GB. So in couple of months it will hit 10GB again. How should ...
4
votes
1answer
58 views

Why does drupal create revision table?

From database design perspective, Why does Drupal even create these tables? They are so much alike. There are modules & methods for getting rid of these tables, But why are they there? MariaDB ...
0
votes
1answer
104 views

Migration not importing into image fields

I'm working on a Migration class to import from a depreciated WordPress plugin and everything's just about there -- everything succeeds when importing and there aren't any errors; taking the SQL from ...
0
votes
1answer
48 views

Migrating SQL dump from Drupal 5 into Drupal 7

My site went recently down, and all the data were lost (PHP installation of Drupal 5). What I am left is simple SQL dump from PHPMyAdmin. I would like to "use" this disaster and finally migrate to ...
1
vote
1answer
311 views

500 internal server error while installing drupal

What is the reason for the error "500 internal server error" while trying to install drupal, i have created database successfully After that i have downloaded and extracted the drupal 7.22 in my ...

1 2 3 4 5 9