For problems and solutions related to database compatibility.

Cannot Connect To DB.

Hello,

I'm building a custom node for a friend's website, and this is my first attempt. My goal is to build a node that provides some text along with six tabs, each containing unique content being pulled from other nodes. I'm using CCK and Javascript Tools (tabs plugin module) to create the node.

I've successfully set this up on my local environment (unix/mac) and the module test out ok. I've attempted to recreate the module in a live environment and I'm unable to connect to my mysql database.

The error is

Can someone tell me if there is something visibly wrong with this script? I'm just now learning php and have been using Drupal for some time. I cannot for the life of me figure what I'm doing wrong here.

Thanks,

Will

<?php

class DBJT {
function DB() {
$this->host = "localhost";
$this->db = "database";
$this->user = "user";
$this->pass = "pass";
$this->link = mysql_connect($this->host, $this->user, $this->pass);
mysql_select_db($this->db);
register_shutdown_function($this->close);
}
function close() {
mysql_close($this->link);
}
}

$myyear = $_GET["year"];

define(WC_DB_HOST, 'localhost');
define(WC_DB_NAME, 'database');
define(WC_DB_USER, 'user');
define(WC_DB_PASS, 'pass');

Correct syntax in drupal for pivoting profile_values table?

Hi all,

This great forum has provided me with most of my questions; I wish all sites had such great search functionalities. I couldn't however find an answer to this question though: How to pivot the profile_values tables?

Short version: How to pivot the profile_values table so that it's laid out horizontally like this: [ uid | value1 | value2 | ... | valueX ] instead of vertically as it is now?

Long version: I have to build up a table containg information about a user, and only one record should be used pr. user. I need the values in the profile_values table as part of this as it contains demographic information. Therefore I believe I need to pivot the table and have settled for an approach I've used before: "put null in a value field unless it equals an indexing number and finally group by id" (which might not be a good way of doing it, and I welcome suggestions of doing it another way). However, when I put this SQL into a .inc file it just doesn't work and the MySQL error message is of little help saying "refer to the manual". So I was wondering if anyone have already done this (pivoting the profile_values table that is) and would like to share the SQL? This is the SQL statement I think would work:


SELECT uid, group_concat(if(fid = 1, value, null)) AS Birthday,
group_concat(if(fid = 2, value, null)) AS Gender,

MySQL Database Structure

I am a relatively new user to Drupal and am building a content managed website for you Church. I have decided to use Drupal as the 'back-end' for the church secretary to update the site with. I don't want to use the drupal UI to be the actual website, just incorporate Drupal with the website I've already made.

Drupal mysql database

Hi: I was wondering if anyone knows, which tables, control and store the stories and menus of old stories? Also I was curious which table contains and controls where anyone can view stories anywhere thoughout the Site without logging ? I know these are probably da questions for you drupal oldhands, but I would really like to understand Drupal to its bowels. I don't want to just be able to just up or download a datebase.sql and save as a backup, I want to understand how to do any damage control on any table in the drupal database.. Is there somewhere where these docs are located?

Debian GNU/Linux Etch corrupts Drupal 5.1

Hi,

I'm not exactly sure how to phrase this appropriately: Either "Debian GNU/Linux Etch corrupts Drupal 5.1", or "Drupal 5.1 is potentially incompatible with Etch", at least for non-English websites under some circumstances; I'm trying to find out, what these exact circumstances might be, and how to fix the failures caused by the upgrade.

_The Problem_

After upgrading Sarge to Etch, Debian includes PHP 5, MySQL 5, and Apache 2.2. With this upgrade, some 3rd party modules became disfunctional in Drupal 5.1, and all special characters, all German Umlaute, and all texts with non-English characters broke/got corrupted/were displayed wrongly. This applies _only_ to Drupal sites, other pages (static via Apache, or LAMP systems like MediaWiki or Gallery2) are not affected. Also, Drupal lost some configuration information due to the upgrade (e.g. site name, site description) which could be entered afterwards again. As it seems, Drupal is accepting Umlaute and special characters again (e.g. in the site name; currently I can't test it on nodes due to failures of 3rd party modules when previewing). Because of this behaviour, I suspect a problem with the transition/conversion from MySQL4 to MySQL5 which only affects _existing_ data (in my case, some 15.000 nodes).

Example 1 with some umlauts and typographic characters (after the corruption):

Oracle 10g porting, blocks rendering problem

Hi all. I'm doing an experimental port of drupal 5.1 to Oracle 10g. I have a core system more or less running (installation and users creation works), but I have a silly problem: the blocks are not rendered, only the main page (as example, the user login form is not visible). Probably is a database failure, but until now I was unable to catch the right place in the code where the problem surfaces. I'm new to drupal, and I haven't found yet the right path between pages, themes, blocks and nodes...

Someone can point me to the right place where drupal choose to render blocks?

Pages

Subscribe with RSS Subscribe to RSS - Deprecated - Database compatibility