return true;
}
+/* DEPRECATED!
function closeMysql() {
mysql_close($this->_linkId);
}
+*/
function query($sql) {
return new result($this->_queryId, $sql);
}
-
-function executequery($sql) {
+/* DEPRECATED!
+function executequery($sql) { //same as query()!
return($this->query($sql));
}
function executeupdate($sql) {
return($this->update($sql));
}
+*/
function update($sql) {
if (!$this->Master) {
return(@mysql_insert_id($this->_linkId));
}
-function exception($errorMessage) {
+function exception($errorMessage) { //Internal only!
echo "<!-- ";
echo @mysql_error($this->_linkId)," (",@mysql_errno($this->_linkId),")";
<?php
function delete_friend() {
-if($_POST["delete_id"]) {
-$sql = "delete from `nodes` where `node_id` = '{$_POST["delete_id"]}' and `external_link` = 'sessions://friend'";
-$sql1 = "delete from `node_content` where `node_id` = '{$_POST["delete_id"]}'";
-$db->executequery($sql);
-$db->executequery($sql1);
-return (true);
-
-
-
-
-
-
+ if($_POST["delete_id"]) {
+ $sql = "delete from `nodes` where `node_id` = '{$_POST["delete_id"]}' and `external_link` = 'sessions://friend'";
+ $sql1 = "delete from `node_content` where `node_id` = '{$_POST["delete_id"]}'";
+ $db->query($sql);
+ $db->query($sql1);
+ return (true);
+ }
}
-}
-?>
\ No newline at end of file
if (($node['template_id']!='2019721') && (isset($_SESSION['user_id']))){
//setting user location
$q="update users set last_action=NOW(),user_location_vector='".$node['node_vector']."',user_action='".addslashes($node['node_name'])."',user_action_id='".$node['node_id']."' where user_id='".$_SESSION['user_id']."'";
-$db->executequery($q);
+$db->query($q);
}
$whole_time=SubStr((Time()+SubStr(MicroTime(),0,8)-$timer_start),0,7);
}
}
+/* DEPRECATED!
function absolute($row) {
if ($row > 0) {
// positive row number
$this->exception("Cannot absolute position to row 0");
}
}
+*/
function getRecord() {
return $this->_currentRecord;
}
}
+/* DEPRECATED!
function getVariable($column) {
return (int)$this->_currentRecord["$column"];
return $this->_currentRow + 1;
}
}
+*/
function getNumRows() {
return $this->_numRows;
}
+/* DEPRECATED!
function getNumFields() {
return $this->_numFields;
}
+*/
-function exception($errorMsg) {
+function exception($errorMsg) { //Internal only!
die("<pre>SQLException: ".$msg."</pre>");
}
}
-?>
\ No newline at end of file
+?>