php result mysql_query SELECT FROM data or die mysql_error data mysql_

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
<?php
$result = mysql_query("SELECT * FROM `data` ") or die(mysql_error());
$data = mysql_fetch_array($result);
do (
printf ('
<a href="#"><h2>%s</h2></a>
<img src="images/test.jpg" />
<p>%s</p>
',$data["title"],$data["m_desc"]));
while($data = mysql_fetch_array($result));
?>