Welcome to the Question2Answer Q&A. There's also a demo if you just want to try it out.
+2 votes
541 views
in Q2A Core by

I am looking for something like qa_get_logged_in_qcount() ?????

Any tips appreciated

1 Answer

+2 votes
by
selected by
 
Best answer

Why don't you run a query something as below...

/* You may wrap below code within a function for reuse */
// get loggedin userid
$uid = qa_get_logged_in_userid();
// query for question (type=Q)
$query = "SELECT title FROM ^posts WHERE type=$ AND userid=#";
// execute query
$result = qa_db_query_sub($query, 'Q', $uid);
// get count
echo qa_db_num_rows($result);
by
Thanks a lot. I thought there is already this information available in some global array so that I don't have to run yet another query and slow down the perf
by
It is very valuable that you provide comments in your code snipped
...