Changeset 261

User picture

Author: Mighty Gorgon

(2011/04/09 22:55) 11 months ago

Small fix in guestbook.

Affected files

Updated extras/trunk/guestbooks/ip_root/plugins/guestbooks/includes/class_guestbooks.php Download diff

260261
95
			$order_sql = " ORDER BY " . (!empty($order_by) ? $order_by : "p.post_time ASC");
95
			$order_sql = " ORDER BY " . (!empty($order_by) ? $order_by : "p.post_time ASC");
96
			$limit_sql = (!empty($n_items) ? (" LIMIT " . (!empty($start) ? ($start . ", " . $n_items) : ($n_items . " "))) :
"");
96
			$limit_sql = (!empty($n_items) ? (" LIMIT " . (!empty($start) ? ($start . ", " . $n_items) : ($n_items . " "))) :
"");
97
97
98
			$topics = array();
99
			$sql = "SELECT p.*" . $sql_select_extra . "
98
			$sql = "SELECT p.*" . $sql_select_extra . "
100
							FROM " . $this->guestbooks_posts_table . " p" . $sql_from_extra . "
99
							FROM " . $this->guestbooks_posts_table . " p" . $sql_from_extra . "
101
							WHERE p.guestbook_id = " . $guestbook_id
100
							WHERE p.guestbook_id = " . $guestbook_id
...
...
122
121
123
		if (!empty($post_id))
122
		if (!empty($post_id))
124
		{
123
		{
125
			$topics = array();
126
			$sql = "SELECT p.*
124
			$sql = "SELECT p.*
127
							FROM " . $this->guestbooks_posts_table . " p
125
							FROM " . $this->guestbooks_posts_table . " p
128
							WHERE p.post_id = " . $post_id;
126
							WHERE p.post_id = " . $post_id;