MySQL is an open-source, relational database management system. Use this tag for questions specific MySQL, not for saying "I am using MySQL."
0
votes
0answers
17 views
Ubercart adjustments query hangs up
Recently found a bug in my system which uses ubercart, such that whenever I click on adjustments tab of specific product edit page, the cpu utilization for mysql shoots up to 100% for some reason.
I ...
2
votes
2answers
40 views
General error: 2006 MySQL server has gone away
This is the error I am suddenly getting.
Additional uncaught exception thrown while handling exception.
Original
PDOException: SQLSTATE[70100]: Unknown error: 1317 Query execution was ...
1
vote
1answer
32 views
logging in after exiting website under maintenance
i was installing updates for drupal website, while on maintenace mode. waited for updates to finish and then signed out. i've been trying a lot of things i'm reading online and it doesn't work. on ...
1
vote
1answer
35 views
How do I get a new database connection with a new setting?
I want to set the GLOBAL variable innodb_flush_log_at_trx_commit, and then run a migration after getting a new connection since changes to a global variable does not affect the current session.
So ...
0
votes
1answer
23 views
how do I make use of a calorie mysql datatable
I have a database (MySQL) with information about food. It has several columns, for example
product name | calories | fat | unit
bread | 100 | 10 | grams
potatoes | 5 0 | 20 ...
-1
votes
0answers
18 views
Cache conflict with boost
I cached my website with the great Boost module and i need the cache expiration module too to manage my expiration logic .
I installed also the cron cache module to help me flushing all the database ...
2
votes
1answer
235 views
What are some benchmarks with Mysql vs MariaDB while on Drupal 7?
I was wondering how much faster is MariaDB vs Mysql in a Drupal 7 setup.
0
votes
1answer
16 views
Using Drush with ENVVARS
I use EnvVars (vhost) to set my MySQL settings so I can have cross-server settings.php file without having to update it 3 different times.
I am wondering if there is a way to get drush to do one of ...
4
votes
1answer
53 views
What complications are there if i switch Mysql to MariaDB? Any Drush issues?
I have a heavy mysql drupal 7 site and i was thinking about switching mysql over to mariadb, but i wasn't sure what issues i would run into. From what i'm reading mariadb seems to be just a drop in ...
2
votes
1answer
33 views
Can db_select cope with mysql “case when” structures?
I have a complex mysql query with "case when" to combine values across multiple rows in columns. I'm currenty using db_query, but I would like to use the TableSort and Pager extenders. But (correct me ...
0
votes
0answers
31 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 ...
2
votes
2answers
84 views
Drupal 7 db_insert() execute() error when table contains unique keys
I have a database (mysql) table that contains a unique key in barcode column.
What I intend is this:
I have a form that has a barcode field.
When user submits the form and the barcode entered ...
2
votes
2answers
92 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 ...
2
votes
1answer
86 views
How to implement a mysql date or datetime field correctly in hook_schema()?
I have written a mymodule.install file which contains a schema definition to create a table in my database. This table contains two data fields. Theese fields will be populated by the users when they ...
0
votes
0answers
28 views
two and operators in one MySQL query in drupal [closed]
I have a query which run and shows result in phpmyadmin but in drupal gives mysql syntax error
this is the code
$result12 = db_query("SELECT * FROM Donation_match_data WHERE donation_id =".$don_id." ...
0
votes
0answers
16 views
broken file/image field in database
I am unable to upload images to image field traditionally or through IMCE. I beleive the issue was caused by me deleting some records in dr_file_managed, dr_file_usage, and ...
1
vote
2answers
125 views
Drupal Master/Slave Replication
I've setup two MySQL servers with Master/Slave replication for the drupal database and I've confirmed the databases are in sync and replicating.
I am now trying to point drupal to both databases ...
1
vote
0answers
50 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
35 views
What are best practices for Drupal 7 my.conf settings?
I posted the following wiki to GDO to try to consolidate best practices for Drupal implementations:
http://groups.drupal.org/node/289613
There's just so much written out there, but the documentation ...
0
votes
0answers
16 views
What is the error in the below Query? [closed]
I have written the below query in Drupal6.
$sql = "SELECT registryvalue FROM {muln_registry} WHERE fk_applicationid = %d AND registrykey = '%s'";
$result = db_result(db_query($sql, 32, ...
1
vote
1answer
33 views
Records with identical uid and timestamp in node_revision
I'm investigating an issue on a D7 site where a handful of node revisions have apparently gone missing. The issue was discovered on 3/5, and I just noticed in my node_revision table that several ...
1
vote
0answers
36 views
How to link views module with customized mysql
I'm a newbie to drupal. I just got a web designing work. My client asked me to create a system somehow like this.
Basically, you enter your age and then hit submit; the result page will be a list of ...
0
votes
1answer
76 views
“Content Type Edit/Add” gives Whitescreen, no errors loged, what to do?
I am running a Drupal Commerce Kickstart 1 on top of it (D7)site on localhost/xampp (1.7.7).
Now:
When I go to Content Type (/admin/structure/type), and click Edit on a given type or New Content ...
0
votes
1answer
63 views
Lengthy MySQL query being exec
I've inherited a Drupal site that is experiencing slow load times and I'm trying to troubleshoot the problem. The site is run on a dedicated box with what should be enough resources.
I ran the Devel ...
0
votes
0answers
180 views
What causes Drupal to run slowly in a Vagrant VM when connecting to an external database? [closed]
Our development team uses Vagrant VMs for development so that each person can have their own working directory for code changes while sharing a database on one of our dev servers to keep ...
1
vote
1answer
72 views
Drush sql-sync to drop tables on target
Command:
drush sql-sync @prod @dev
As I experienced, it does not drop tables on target (@dev) machine.
Is there a way, while syncing this way, to drop tables on target, so databases match ...
0
votes
1answer
61 views
Mysql query returns 0 rows on JQGrid filter due to translated rows. Drupal 6
I have a JQGrid table that can be displayed in different languages. The data for this table is stored as English text and translated when output. The JQGrid table can be filtered by text.
The issue I ...
0
votes
2answers
49 views
update only a part of url path in database
I am migrating website and I changed my mind about url path where my images are stored. Before the path looked like: files/name-of-article/image.jpg now I would like to change it to ...
0
votes
1answer
30 views
Where In or clause for when a variable might not exist
If I were to run a normal mySQL query that selects all nodes I would do this:
set @type='node';
select * from actions where type = @type;
but what if lets say I set type to be something that ...
0
votes
1answer
114 views
Help on Drupal table prefix
I just installed Drupal 7 and made some content and configuration.
After that, I just realized I did not put any table prefix on installation.
My problem is:
Is there anyone here that knows the SQL ...
0
votes
1answer
86 views
Can I map to Body Summary in Feeds Importer?
I'm setting up a Feeds Importer to pull in content form a previous CMS. To keep things manageable I'm setting up MySQL exports saved to CSV files per Content Type. In a content type of News we're ...
1
vote
1answer
87 views
Delete all nodes from database except from user1 and admin
I have got thousands of junk entries in my Drupal 6 website. Is there a way I can Delete all nodes from database accept from user1 and admin.
I also want to delete all users accept user1 and admin.
1
vote
1answer
55 views
Drupal 6 querying multiple tables
Having some trouble with the Drupal 6 query syntax. My query works fine on its own:
SELECT term_node.tid, term_data.name FROM term_node, term_data WHERE nid = 22640
Below is what I have when I ...
0
votes
3answers
93 views
Multiple database group users for one database
For a blog post, I have db design of 1 database in D7, the database contains multiple database users:
Anonymous - Only Read privilege on Database
Writer - CRUD privilege on Database
Admin - Has all ...
0
votes
2answers
64 views
How to retrieve form entry for use as default value?
I'm building a form in a custom module, and I'd like to have that form show as it's default value the value that had been saved to the DB during the previous edit, but I have no idea how to do it.
...
0
votes
1answer
34 views
How to delete lines from a table created by a custom module?
I'm working on a custom module that has an admin form designed to contain a number of values.
age 21 => value, age 22 => value, etc.
The issue I'm having is that while I can add information to the ...
3
votes
1answer
227 views
Fatal PHP error on Drupal 7 with IIS
Logging as Admin user on Drupal 7 website stored on an IIS machine, I get the following error:
Fatal error: Uncaught exception 'PDOException' with message 'SQLSTATE[HY000]:
General error: 2006 MySQL ...
3
votes
2answers
256 views
Drupal sites extremely slow due to cache SELECT-queries
I have multiple drupal 7 sites running on my shared hosting. Suddenly almost all of my drupal sites began running very slow. After some searching I found that I had 132k slow queries of the 140M ...
3
votes
1answer
51 views
Create MySQL View in hook_schema()
I want to create a MySQL View in hook_schema() for a module I am developing.
Does anyone know how to do that?
1
vote
0answers
45 views
My queue table is huge, is it safe to empty it?
I have launched some batch jobs that I didn't finish. Now I notice my queue table is almost 1 GB. Is it safe to empty it?
0
votes
1answer
165 views
Multiple webforms: Show list of those user has submitted?
Is there a way to list all webform submissions user has submitted using views?
I have a site where there is hundreds of webforms. I need to create a block that contains all webforms by title current ...
3
votes
1answer
71 views
drupal and ndb cluster engines
we have an application which was built with drupal connecting to a mysql db. upon go-live we found that the production db is a clustered one and requires us to change our db tables to NDB cluster ...
0
votes
0answers
111 views
User input dropdown list sanitization in drupal 7
For Drupal 7.
I am using a custom search form with more than 6 drop-downs. I would like to sanitize the user select value before passing to the query.Now a days there are many tools available to edit ...
1
vote
1answer
127 views
Dealing with MySQL database quotas [closed]
I have my Drupal site hosted at a society that gave me a 400M database quota. After 4 weeks of production, it has reached 100M. I predict that after a year, it will reach the limit.
Is any way to ...
4
votes
2answers
63 views
Instr() function on drupal
I need a funtionality for search tags from a textarea (drupal form), I make it from sql, then, mysql have this function:
https://dev.mysql.com/doc/refman/5.0/en/string-functions.html
I believe that ...
4
votes
1answer
58 views
Issue with module's hook_uninstall (not uninstalling db entries)
I have a custom Drupal 6 module (based on this issue) that puts some custom date and time formats into the date_format_types table and then can be accessed from /admin/settings/date-time/formats. ...
1
vote
1answer
97 views
changing a MySQL query to a drupal query any ideas
I'm trying to change the following query to a drupal db_query:
SELECT first_name, SUBSTR(first_name,1,3) AS firstname_substr FROM civicrm_contact WHERE id != 'NULL' ;
I have tried this, but its not ...
1
vote
1answer
144 views
Getting a list/array of all organic groups a user is part of
I have been searching online for awhile and so far I have been unable to find any og functions that will give me an array or list of all groups a user is a member of. Does such a function exist? If ...
2
votes
1answer
164 views
MySQL server has gone away - production site [duplicate]
Possible Duplicate:
Solving “MySQL server has gone away”, mysql error 2006
My website is moved from localhost to virtual hosting and after 1 week I receive an error 2006 2006 MySQL server ...
5
votes
2answers
129 views
Use a database specific function in dbtng (e.g. uuid in db_insert)
I have a table that contains a char(36) field for a uuid. It seems like I can insert data into that field with a mysql query like: INSERT INTO mytable (uid, event_guid) VALUES (1, uuid());. I'd like ...



