For problems and solutions related to database compatibility.

More than one database for 1-site.

Hi,
is it possible to use more than one database for my drupal site?

I tried to change the "settings.php" file (in line $db_url = "mysql://user name@hostname/dbname). but it doesn't work

I want to maintain two databases at a same time. If i add/modify/delete any node or anything in my site,it should affect all the database which i mentioned.

please reply me soon.

users.data and profile_fields/profile_values tables

We've installed Drupal 5 on our server, enabled the profile module and added a couple of fields for each user to set when registering. For some reason, some field values are stored in 'profile_fields/profile_values' tables, and some users has their fields stored in serialized form in users.data table column. Can anyone please explain why it happens, and whether I need to deserialize the data from users.data field? We use MySql stored procedures to work with the Drupal database and deserializing users data takes very long time because of a great number of users.

Thanks,
Jon

Drupal db_query all rows affected but randomly one missing

I pass an array of questions nid from form to function
$childs = Array(
200=>1,
201=>1,
202=>1,
203=>1);

function make_child_questions($childs)
{
ksort($childs);
$parent = key($childs);

foreach ($childs as $key => $c)
{
if ($key != $parent)
{

db_query("update question set parent_que_nid = $parent where (nid = $key AND parent_que_nid = 0)");

print_r($child_condition.',Affected : '.mysql_affected_rows());
}
}
}

Problems connecting to MSSQL DB.

I have patched to mssql_install_driver_merged_5_3 and I reach install.php but, I keep getting an error trying to connect to the database. Am I missing something? Can someone point me int he right direction.
I'm using
Apache 2.2
MSSQL express
PHP 5.2.3

On the install page I plug in the following
database = drupal
user = imryr
password= something after i get a failed login in my event viewer

host = localhost
= 127.0.0.1
= ELRIC\SQLEXPRESS
= ELRIC
= SQLEXPRESS
= .\SQLEXPRESS
= 192.168.1.144
= etc...
port = null or 1433 tried both

I receive this error each time:

Warning: mssql_connect() [function.mssql-connect]: Unable to connect to server: ELRIC\SQLEXPRESS in C:\wamp\www\includes\install.mssql.inc on line 42

Warning: Cannot modify header information - headers already sent by (output started at C:\wamp\www\includes\install.mssql.inc:42) in C:\wamp\www\includes\common.inc on line 141

lines 41-46 is this

// Test connecting to the database.
$connection = mssql_connect($url['host'], $url['user'], $url['pass']);
if (!$connection) {

preview and submit, do they have two different tables?

when you hit preview to preview a post which table is the information stored in? Same question with the submit button. If there are two tables are they identical?

Thanks

Migrated to VPS, but slow mysql queries

I set up new vps for my site.... I put lighttpd, php4, mysql 5.0.32, eAccelerator v0.9.5.... However, I am getting slow Mysql queries.... I don't know why is it... When I run devel module, I see the majority of mysql queries are red colored, meaning, they take more than 5md to load.... I think that I had faster queries on shared hosting.

I turned throttle mod, turned off some unimportant modules, tweaked my.cnf a little bit, but couldn't change the situation about the speed of mysql.... and I cannot make my pages load belod 1 sec.... THey all take approx 1-2-3 sec. to load.

Pages

Subscribe with RSS Subscribe to RSS - Deprecated - Database compatibility