Jump to content
Developer.Sloopy

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

Share this post


Link to post
Share on other sites

 

 

или же позже выброшу.

 

так и не выбросил вывод популярных вопросов...

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×