Formatting DateTime Datatype in query

Hello,

I want to display content from a custom table in imported from another database. The query works fine but I want to format a datetime value and only include year, month, day.

My query looks something like -

$result = db_query('SELECT name, date, summary from table.test
where posting_status=\'A\'',array());
foreach ($result as $record) {

print '<b>Name:</b> '.$record->name;
print '<b>Date :</b> '.$record->date;
print '<b>Summary:</b> '.$record->summary;

}

OUCH(uk) UK National Charity Website

OUCH(uk) UK National Charity Website

OUCH(uk) is the leading charity worldwide dedicated to helping sufferers of Cluster Headache, this is a devastating condition also known as 'suicide headache'. Turtlereality Web Design Have been working with OUCH(uk) since as long ago as 2006. Their current site is built using Drupal 7, Drupal Commerce and the excellent charity database system CiviCRM. This combination of Drupal, Commerce and CiviCRM is a fantastic solution for charities of any size. 

Sectors: 
Community
E-Commerce
Non-profit

Playbark.com e-commerce website

Playbark.com screenshot

Turtlereality have been working with Playbark since 2007, their current website is the third generation e-commerce site currently using Drupal 7 and Drupal Commerce. 

Sectors: 
E-Commerce
Retail and Distribution

Hide username in comments through CSS?

Where in themes can I hide the username in comments through CSS?

https://imgur.com/LLEEr40

Or is there a better way?

Site giving error messages from old database connect

Hi,

Suddenly after the upgrade to the latest version of Drupal 7 my site is really behaving strange - i'm getting an error back stating a misconnect with an user that i'm not using in any of the modules of the site. The user was used on my development environment.

Is it cached somewhere in the dB? or is it PHP playng with me?

The exact errormessage: "Kunde inte ansluta mot databasen: Access denied for user 'qyxrhj_message'@'localhost' (using password: YES)"

Any clues?

BR

Jontxu

How do you add a custom module to a menu?

I have just built a wonderful custom module. Now I need to add it to my main menu, under the parent item "Tools and Resources."

I know I can go to the homepage and click on the little gear and go to "List links", which will take me to admin/structure/menu/manage/main-menu/list?destination=node and I can click-and-hold on the little compass and drag-and-drop my module in the desired place. But, is there a way to do this through the PHP code in the module itself?

Pages

Subscribe with RSS Subscribe to RSS - Drupal 7.x