domain_batch_data_type

Versions
5 – 6
domain_batch_data_type($type)

Converts a data type into a sql-safe string.

Parameters

$type The data type defined in hook_domainbatch().

Return value

A sql-safe string ('%s', %d, %f, %b) for use with db_query().

Code

contributions/domain/domain_admin.inc, line 999

<?php
function domain_batch_data_type($type) {
  $return = "'%s'";
  switch ($type) {
    case 'string':
      break;
    case 'integer':
      $return = "%d";
      break;
    case 'float':
      $return = "%f";
      break;
    case 'binary':
      $return = "%b";
      break;
  }
  return $return;
}
?>

Post new comment

The content of this field is kept private and will not be shown publicly.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • Lines and paragraphs break automatically.
  • You may post code using <code>...</code> (generic) or <?php ... ?> (highlighted PHP) tags.
  • Web page addresses and e-mail addresses turn into links automatically.

More information about formatting options

CAPTCHA
This question is for testing whether you are a human visitor and to prevent automated spam submissions.
Image CAPTCHA
Enter the characters (without spaces) shown in the image.