For problems and solutions related to database compatibility.

Announcement: This forum has been deprecated

This forum is no longer in use.

For alternatives, please see the Database related issues for Drupal.

There is also group dedicated to discussions around Drupal and PostgreSQL at http://groups.drupal.org/postgresql

Database for each user

Hello Friends,

I need to implement website for corporate. So whenever new corporate admin registered that time need to create new database for them. So how i can handle this with one drupal installation. Can anybody please help me

Thanks in Advance.

PDOException: SQLSTATE[42S02]: Base table or view not found: 1146 Table

Am getting well with drupal but not good with databases. I mysql, I got this error after installing the following modules ejectorseat, session limit, node expire, autoespire, bean booking time slot

Please assist me. Please I need your help.

Help with a Query

Hi to all, I'm new on this field, I've done various researches on the web to find out how I can realize this script in php:
I'm trying to make a call, query, with my mySQL database to show the result of the query into a container (web page) in Drupal. My script is attached below:

Drupal table with Sortable header

Hi,

Can anybody help me out??

I have created a sortable table using Drupal's code. Now I want to make the header name and value in row center aligned. Not able to recognize how doing that.

posting sample code :

$header = array(
array('data' => t(' ID# '), 'field' => 'cust.customer_id'), //
array('data' => t('First Name'), 'field' => 'cust.res_name'), //
array('data' => t('Last Name'), 'field' => 'cust.res_lname'), // these header names (ID # , First Name...etc) should be center aligned
array('data' => t('Email'), 'field' => 'cust.mail_id'), //
array('data' => t('Phone'), 'field' => 'cust.customer_phone'),//
);

$result = db_select('customer_details', 'cust')
->extend('TableSort')
->extend('PagerDefault')
->limit(20)
->fields('cust',array('customer_id', 'res_lname', 'res_mname', 'res_name', 'mail_id', 'con_code1', 'con_code2', 'customer_phone')
->orderByHeader($header)
->execute();

$rows = array();
$row[] = ''.$r->customer_id.''; //
$row[] = ''.$r->res_name.''; //
$row[] = ''.$r->res_lname.''; //these values should be center aligned
$row[] = ''.$r->mail_id.''; //

Add more than one field in a single column header

Hi,,

Can anyone clear my doubt?????

As per my requirement I want to concatenate two fields of database and display under the single column of the header. I am using this code:

$header = array(
array('data' => t('Customer_id'), 'field' => 'cust.customer_id'),
array('data' => t('Last Name'), 'field' => 'cust.res_lname'), //here I want to add one more field cust.res_name
);

Pages

Subscribe with RSS Subscribe to RSS - Deprecated - Database compatibility