For problems and solutions related to database compatibility.

user warning: Access denied for user: while Search Query

This is what I get with 4.7.4 when I am running a Search query.

user warning: Access denied for user: xxxxxx@yyyyy' to database 'xxxxxx' query: CREATE TEMPORARY TABLE temp_search_sids ...............

Any ideas anybody?

Working w/ CiviCRM

I've created a resource directory in Filemaker v8 that I want to import into the CiviCRM module on my site. I saw some comments about using it to manage folks who register on one's site, but I didn't see anything on importing a dbase file into CiviCRM and its flexibility to define the various fields.

I'd like to hear from folks who've worked with this module; can you offer some advice about this project?

Oracle doens't support DISTINCT with CLOB columns...

I still struggle with my oracle DB schema and face a problem.

I'm trying to display correctly the first Drupal page and it comes with this query (user.module):

$result = db_query('SELECT DISTINCT(p.perm) FROM {role} r INNER JOIN {permission} p ON p.rid = r.rid INNER JOIN {users_roles} ur ON ur.rid = r.rid WHERE ur.uid = %d', $account->uid);

"perm" is defined as a text column in MySQL/PgSQL schema, so I convert it to a CLOB in Oracle. But Oracle doesn't support DISTINCT clause with CLOB column.

MySQL size for numeric datatypes

Hi,
I'm trying to get some work on an Oracle DB layer and face some odd (at least for me) behaviour from MySQL.

MySQL doesn't constrains the range of values that can be stored in a column.
We have a good example of this in the MySQL Drupal Schema :

CREATE TABLE menu (
  mid int(10) unsigned NOT NULL default '0',
  pid int(10) unsigned NOT NULL default '0',
  path varchar(255) NOT NULL default '',
  title varchar(255) NOT NULL default '',
  description varchar(255) NOT NULL default '',
  weight tinyint(4) NOT NULL default '0',
  type int(2) unsigned NOT NULL default '0',
  PRIMARY KEY (mid)
) TYPE=MyISAM;
INSERT INTO menu VALUES (2, 0, '', 'Primary links', '', 0, 115);

So am I the only one bothered by such things ?

Should we better remove all kind of numeric value size as it's pretty useless ?
In fact PgSQL schema came without these limits, so I think I would go this way.

Any thoughts ?

From MySQL doc (http://dev.mysql.com/doc/refman/5.0/en/numeric-types.html)

Another extension is supported by MySQL for optionally specifying the display width of an integer value in parentheses following the base keyword for the type (for example, INT(4)). This optional display width specification is used to left-pad the display of values having a width less than the width specified for the column.

The display width does not constrain the range of values that can be stored in the column, nor the number of digits that are displayed for values having a width exceeding that specified for the column.

Massive users insert with not repetitions

How to do a Massive insert of users in a table with not repetitions?

We have different websites with several users tables, and now we want to integrate all these users in one unique website and users table,

1) What is the script to select users from a users table and insert to other users table?

2) How we can delete users with the same email?

3) Where we can find or build SQLs senteces for selecting users name and/or emails depending on the roles or organic groups?

thanks in advance,
Ferran

node varchar not long enough - > patched to text

I got annoyed by this error message from the node table
warning: pg_query(): Query failed: ERROR: value too long for type character varying(128)

so i wrote a postgresql sql patch to change them varchars to text..

maybe it's useful to someone else?

Pages

Subscribe with RSS Subscribe to RSS - Deprecated - Database compatibility