comparison modules/simpletest/tests/upgrade/drupal-6.comments.database.php @ 0:ff03f76ab3fe

initial version
author danieleb <danielebarchiesi@me.com>
date Wed, 21 Aug 2013 18:51:11 +0100
parents
children
comparison
equal deleted inserted replaced
-1:000000000000 0:ff03f76ab3fe
1 <?php
2 db_update('node')->fields(array(
3 'comment' => 2
4 ))
5 ->condition('nid', 1)
6 ->execute();
7
8 db_insert('comments')->fields(array(
9 'cid',
10 'pid',
11 'nid',
12 'uid',
13 'subject',
14 'comment',
15 'hostname',
16 'timestamp',
17 'status',
18 'format',
19 'thread',
20 'name',
21 'mail',
22 'homepage',
23 ))
24 ->values(array(
25 'cid' => 1,
26 'pid' => 0,
27 'nid' => 1,
28 'uid' => 3,
29 'subject' => 'Comment title 1',
30 'comment' => 'Comment body 1 - Comment body 1 - Comment body 1 - Comment body 1 - Comment body 1 - Comment body 1 - Comment body 1 - Comment body 1',
31 'hostname' => '127.0.0.1',
32 'timestamp' => 1008617630,
33 'status' => 0,
34 'format' => 1,
35 'thread' => '01/',
36 'name' => NULL,
37 'mail' => NULL,
38 'homepage' => '',
39 ))
40 ->execute();