You are here

function video_insert in Video 6

Same name and namespace in other branches
  1. 5 video.module \video_insert()
  2. 6.2 video.module \video_insert()

Implementation of hook_insert. Create video record in the video table

Return value

TRUE on success, FALSE on error

1 call to video_insert()
video_update in ./video.module
Hook

File

./video.module, line 761
video.module

Code

function video_insert($node) {

  // set the required properties of the video node
  video_presave($node);
  $node->serialized_data = serialize($node->serial_data);

  //Serialize the data for insertion into the database.
  return db_query("INSERT INTO {video} (vid, nid, vtype, vidfile, size, videox, videoy, video_bitrate, audio_bitrate, audio_sampling_rate, audio_channels, playtime_seconds, disable_multidownload, download_folder, use_play_folder, serialized_data) VALUES (%d, %d, '%s', '%s', %d, %d, %d, %d, %d, %d, '%s', %d, %d, '%s', %d, '%s')", $node->vid, $node->nid, $node->vtype, $node->vidfile, $node->size, $node->videox, $node->videoy, $node->video_bitrate, $node->audio_bitrate, $node->audio_sampling_rate, $node->audio_channels, $node->playtime_seconds, $node->disable_multidownload, $node->download_folder, $node->use_play_folder, $node->serialized_data);
}