Quote:
Originally Posted by Relative0 Thanks kindly for the idea, I am guessing that you are right and that I am still doing something wrong. Here is what I have for a few lines of code in store_basic() in the libs/link.php: Code: if($this->id===0) {
$sql = "INSERT INTO " . table_links . " (link_author, link_status, $link_type, link_randkey, link_category, link_date, link_published_date, link_votes, link_karma, link_title, link_content) VALUES ($link_author, '$link_status', '$link_type', $link_randkey, $link_category, FROM_UNIXTIME($link_date), FROM_UNIXTIME($link_published_date),$link_votes, $link_karma)";
if($this->debug == true){echo '<hr>store_basic:Insert:' . $sql . '<hr>';}
$db->query($sql);
$this->id = $db->insert_id;
} else {
// update
$sql = "UPDATE " . table_links . " set `link_reports`=$link_reports, `link_comments`=$link_comments, link_author=$link_author, link_status='$link_status', link_randkey=$link_randkey, link_category=$link_category, link_modified=NULL, link_date=FROM_UNIXTIME($link_date), link_published_date=FROM_UNIXTIME($link_published_date), link_votes=$link_votes, link_karma=$link_karma, link_field1='$link_field1', link_field2='$link_field2' WHERE link_id=$this->id";
// Brian had originally Added this ,link_field1='$link_field1', link_field2='$link_field2' WHERE link_id=$this->id" But it is changed bacl now.
// In place of WHERE link_id=$this->id";
if($this->debug == true){echo '<hr>store_basic:Update:' . $sql . '<hr>';}
$db->query($sql);
}
The error that I get is such:
Warning: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'AND `link_author` = 1 ORDER BY `link_date` DESC LIMIT 1' at line 1 in /home/content/html/Pligg98/libs/db.php on line 233
Any ideas? Thanks much,
Brian |
Check on Page 3...Genghis posted a modified link.php file that gets rid of the error
Does anyone have this error:
Fatal error: Call to undefined function: verify_ownership() in /home/xxxx/domains/xxxxx.com/public_html/submit.php on line 220