Jump to content

FAQ фича, обновленная версия


Recommended Posts

Создаем новую таблицу "support_q": id int(11) AI; name varchar(255); numerus int(11).

 

В support.php под

$dbid = $db->insert_id();

Ставим

$support_q = $db->super_query("SELECT COUNT(*) AS cnt FROM `support_q` WHERE name = '{$title}'");
				if(!$support_q['cnt']){
					$db->query("INSERT INTO `support_q` SET name = '{$title}', numerus = '1'");
				} else {
					$db->query("UPDATE `support_q` SET numerus = numerus+1 WHERE name = '{$title}'");
				} 

Ну а вывод популярных вопросов сами, ну или же позже выброшу.

  • Upvote 1
  • Downvote 1
Link to comment
Share on other sites

  • 1 month later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

×
×
  • Create New...