Error message
Deprecated function: implode(): Passing glue string after array is deprecated. Swap the parameters in drupal_get_feeds() (line 394 of /home1/tylerfra/public_html/includes/common.inc).
planet drupal
Drupal 6 (D7 below)
Below is a helpful function that will return the allowed values list for a Drupal CCK Integer Field as an Array.
For example, here is my allowed values list for my cck integer field "field_dg_hole_tee":
Export Database to File
So today I wanted to learn how to export a Drupal database to a file quickly. Back in the day I would've logged in through cPanel and navigated to PHPMyAdmin, then manually select an export of the database and have to choose where to save the file. Not to mention all the previous steps listed would need to be preceeded by a Drupal cache flush (I don't like the cache inside a database backup). Typically this would've taken me about 5 minutes to complete, well my friends, no longer is that the case.
Drupal 7
$header = array();
$header[] = array("data" => "Column Header Title 1");
$header[] = array("data" => "Column Header Title 2");
$row = array();
$row[] = "Row Column 1 Data";
$row[] = "Row Column 2 Data";
$rows = array();
$rows[] = $row;
$html = theme('table', array('header' => $header, 'rows' => $rows));
Drupal 6
So the other day I needed to detect when someone clicks on the background image of my drupal zen sub theme. Here is how I did it using jquery:
So I was trying to manually run cron.php on a drupal site, and it was timing out because the cron job couldn't finish. The cron job is quite intense, and I'm sure it isn't finishing because I am trying to run it during the day on a busy site. So in order to tell Drupal to forget about your last cron attempt:
- go into your drupal database
- go into the 'variable' table
- sort by the 'name' column ascending order
- look for any variable names beginning with 'cron_' and delete them
Here are some MySQL queries that should get the job done:
Pages