reference/cubrid/examples.xml
7c9f1adb4b7d55a7a37b0503ec895412a6ecc656
...
...
@@ -61,27 +61,27 @@
61
61
/**
62
62
* List the column names of the result set on the screen.
63
63
*/
64
-
echo("<tr>");
64
+
echo "<tr>";
65
65
66
66
while (list($key, $colname) = each($columns)) {
67
-
echo("<td align=center>$colname</td>");
67
+
echo "<td align=center>$colname</td>";
68
68
}
69
69
70
-
echo("</tr>");
70
+
echo "</tr>";
71
71
72
72
/**
73
73
* Get the results from the result set.
74
74
*/
75
75
while ($row = cubrid_fetch($result)) {
76
-
echo("<tr>");
76
+
echo "<tr>";
77
77
78
78
for ($i = 0; $i < $num_fields; $i++) {
79
-
echo("<td align=center>");
80
-
echo($row[$i]);
81
-
echo("</td>");
79
+
echo "<td align=center>";
80
+
echo $row[$i];
81
+
echo "</td>";
82
82
}
83
83
84
-
echo("</tr>");
84
+
echo "</tr>";
85
85
}
86
86
}
87
87
/**
...
...
@@ -129,19 +129,19 @@
129
129
<?php
130
130
$sql = "insert into olympic (host_year,host_nation,host_city,"
131
131
. "opening_date,closing_date) values (2008, 'China', 'Beijing',"
132
-
. "to_date('08-08-2008','mm-dd- yyyy'),to_date('08-24-2008','mm-dd-yyyy')) ;"
132
+
. "to_date('08-08-2008','mm-dd- yyyy'),to_date('08-24-2008','mm-dd-yyyy')) ;";
133
133
$result = cubrid_execute($cubrid_con, $sql);
134
134
if ($result) {
135
135
/**
136
136
* Handled successfully, so commit.
137
137
*/
138
138
cubrid_commit($cubrid_con);
139
-
echo("Inserted successfully ");
139
+
echo "Inserted successfully ";
140
140
} else {
141
141
/**
142
142
* Error occurred, so the error message is output and rollback is called.
143
143
*/
144
-
echo(cubrid_error_msg());
144
+
echo cubrid_error_msg();
145
145
cubrid_rollback($cubrid_con);
146
146
}
147
147
cubrid_disconnect($cubrid_con);
148
148