0
votes
1answer
27 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 ...
1
vote
3answers
203 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, ...
0
votes
1answer
57 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
1answer
53 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 ...
0
votes
1answer
53 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
47 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 ...
1
vote
1answer
27 views

how to check non existent field added later using entityfieldquery? [duplicate]

I added a required field in a Job type node later. So existing nodes don't have that particular field value. I want to include all such field values. But how can I do it? Here is query sample: ...
0
votes
1answer
45 views

How to add table column aliases

I am trying to perform a query on a database that has the following info (in Drupal 7.21): nid | sid | cid | data ---------------------- 32 | 2 | 1 | date 32 | 2 | 2 | name 32 | 3 | 1 ...
0
votes
1answer
37 views

Altering add_to_cart_form_submit() and random PDOException while adding to cart

I have created a customized product with lots of attributes to set for it. I also altered hook_add_to_cart_form_submit() where I collect all selected attributes and calculate a new price based on the ...
0
votes
2answers
63 views

How to put a condition on a query

in my custom module, i am executing a query. global $user; $id = $user->uid; print_r($id); $query = db_query('SELECT n.nid, c.uid, n.title, f.body_value, fm.uri FROM challenges c LEFT JOIN node n ...
2
votes
1answer
54 views

Query result to display in Views

i have created a custom view. its just showing nodes of a particular type. Now i want to do something with it. I am writing a SQL query: global $user; $query = db_select('challenges','c'); ...
0
votes
0answers
28 views

Multiple database sharing single user table [duplicate]

In my Drupal 7 installation I have: Main site: example.com Sub Domains: blog.example.com, forum.example.com (all in same domain) I have database design in such a way: Main Site uses: main_db Sub ...
0
votes
0answers
17 views

Is it possible to use several databases with Drupal? [duplicate]

Is it possible to set up Drupal, so it could connect to several databases and fetch data from them?
0
votes
2answers
53 views

Could anyone suggest a Drupal database versionning tool? [duplicate]

Possible Duplicate: How do I manage collaborative development on a Drupal site? Is there any Drupal database version like GIT for versionning files ? with drush or any thing else ? I've ...
1
vote
1answer
82 views

How do I paginate results with db_query?

How do I paginate results with db_query in Drupal 7? I didn't find any example using db_query.

1 2 3 4 5 9
15 30 50 per page