Jump to content

sql error...


SyncViews

Recommended Posts

74: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 ')' at line 6

<?php
...
//update forums
	$parents_str = '';
	foreach($parents as $i=>$parent)
	{
		if($i==0)$parents_str .  $parent["id"];
		else     $parents_str . ", $parent[id]";
	}

	$sql->query("
		UPDATE forums
		SET	topics=topics+1, posts=posts+1,
		last_topic_name='$subject', last_topic_id=$topic_id,
		last_post_id=$post_id, last_post_time=$time,
		last_user_id=$user_id, last_user_name='$user_name'
		WHERE forum_id IN ($parents_str)
	") or exit(__LINE__.':'.$sql->error);
...

Link to comment
https://forums.phpfreaks.com/topic/101795-sql-error/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.