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

how does drupal know what to query? [closed]

I have recently inherited a Drupal website. I have a slight idea of how it works, but I can't seem to find any information on how Drupal decides to query the database. I have been tasked with ...
0
votes
1answer
21 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
38 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
17 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
26 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
43 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
70 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
16 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
78 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
1answer
63 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
30 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
24 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
18 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
43 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
65 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 ...
-4
votes
0answers
30 views

How can we backup Database from rackspace? [closed]

I am working on a site that is made in drupal 7 and store in rackspace so can anybody help me to get backup or use phpmyadmin of that site I want to run on my local pc to edit that site
1
vote
1answer
55 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
86 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
72 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
53 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
55 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
34 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
68 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
12 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
97 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
38 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
220 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
96 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
146 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 ...
2
votes
0answers
39 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
56 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
44 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
180 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 ...
0
votes
0answers
20 views

How to Quickly Create Webform Content with a Group of Textareas

I am making a top 25 albums of all time webform in drupal 7, which requires me to make 25 artist textareas and 25 album name text areas that should all be paired when submitted to the database. I've ...
1
vote
1answer
55 views

Migrating taxonomy terms when source is a separate table?

I'm writing a migrator for a now-unsupported WordPress plugin that used a single "attachments" table to store data ranging from thumbnails to musical genres. It looks like this: mysql> describe ...
0
votes
2answers
96 views

how to manually add a node in drupal 7 in the database [duplicate]

I have managed to display the title but im missing the body of the title. i cant find in the database which table i missed to edit. here's the list of tables i editted: node node_revision ...
1
vote
0answers
59 views

Saving form data and running custom queries in mysql

I'm new to drupal and although I've researched and asked some questions I'm still stuck on how I can achieve my end result. I have built a php/html/mysql website (www.gbpokerclub.co.uk) but I now want ...
0
votes
1answer
71 views

how to add form data in database

My registration form is multi-step and the form is shown in popup. I m using lighbox2 for popup and working perfectly fine and i have added the form filed in a file that comes with lightbox2 and place ...
1
vote
0answers
84 views

High performance DB Cluster with Drupal

I am looking for a system where I can cluster MySQL. I saw an article which guided me to custom Drupal schema for NDBCluster engine for MySQL clustering, Btw. I am using Drupal 7 with Varnish, ...
1
vote
1answer
68 views

building a query with the database api and groupby multiple fields in drupal 7

first of all I simplified my query so it might be more useable to other users on this site. I'm looking for a solution to use group by on multiple fields. This query selects the values of the ...
1
vote
1answer
68 views

While developing a custom module, which function creates table in database?

While developing a custom module in Drupal 7, which function actually creates tables in the database? I have implemented hook_schema in mymodule.install, mymodule.info, mymodule.module file and ...
0
votes
1answer
75 views

Simpletest fails to create the field_config table

I'm only just getting into TDD with Drupal and unfortunately run into trouble right away. For some reason the simpletest####field_config table isn't being created, and I don't get why; many other ...
1
vote
1answer
162 views

PDOException: SQLSTATE[HY000]: General error: 1 cannot rollback

I have managed to cause this error while working with exposed filters weighting in views. Any idea how I can correct it? I am running Sqlite for database. Is it possible to clear transactions or ...
0
votes
1answer
73 views

Moving SQLite-D7 Installation to other Server throws Uncaught exception in shutdown function

When I move my Drupal7-Website (with SQLite Database) from my XAMP to another Computer also running XAMP I got the following error message. Uncaught exception thrown in shutdown function. ...
0
votes
0answers
41 views

Change Comment Text Format in phpmyadmin

Hello i seem to hav changed the text format for my comments and now all my old comments cannot be seen. When i edit the comment the text format select list has no default value. I would like to give ...
1
vote
2answers
73 views

How do you add a prefix to an existing drupal database for single site use?

I have a drupal 7 site running on a webserver, it is currently using a database that was created with out a prefix. I am attempting to restore that database to a new drupal instance from a shared ...
0
votes
1answer
70 views

2 Drupal Multisites, Separate Databases, Changing 1 Also Changes the Other

I have a very weird issue. Been doing Multisites in Drupal 7 for a while now without any hitches... until last week. I have 2 multisites both with separate databases, however when I change content on ...
0
votes
1answer
47 views

using an existing token as a variable in a custom token

I am using simplenews to send out a newsletter. I have a custom module. It has a table that relates a user code to the user's email. email_address user_code ...
0
votes
0answers
50 views

EntityFieldQuery and “legacy” nodes

Here's the situation, which I suspect is pretty common: A site is deployed where a node type has no fields added. Lots of nodes are added. The site is changed and a new field is added to the node ...
0
votes
0answers
19 views

How to insert the record by default on distributing the module

Im developing the custom module in drupal 6 . Inside the custom module development ,i have created one .install file and wrote the database schema inside it using the _schema() hook function. The ...

1 2 3 4 5 9