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

in Q2a it shows only limited number of list of question on home page.

i am making  twitter like more button but i do'nt know how it retirive Question from databse.

when we open home page of Q2a which page it open first (i think it is qa-page-default.php)

if i have database

msg_id INT AUTO_INCREMENT PRIMARY KEY,
message TEXT

 

than i retrive like this

<?php
include('config.php');
$sql=mysql_query("select * from messages ORDER BY msg_id DESC LIMIT 9");
while($row=mysql_fetch_array($sql))
{
$msg_id=$row['msg_id'];
$message=$row['message'];
?>
<li>
<?php echo $message; ?>
</li>
<?php } ?>

<div id="more<?php echo $msg_id; ?>" class="morebox">
<a href="#" class="more" id="<?php echo $msg_id; ?>">more</a>
</div>

i want to know how to retrive data from Q2adatabase like above.

Please log in or register to answer this question.

...