ok I got it thanks a lot..
now I tried to display the output in a proper way like this..
Column 1 – Event name (with clickable link that when clicked goes to a page that shows the single event on a page with details)
Column 2 – Date of event
Column 3 – City,State.(place)
here is my code
$query = "SELECT * FROM wp_frm_item_metas where field_id IN (8,13, 12, 11 )";
$result = @mysql_query($query) or die (mysql_error());
?><table border="1" colspan="3">
<th>Event</th>
<th>Date</th>
<th>Venue<?
$i=1;
while($i <= 1)
{ echo "<tr>";
while($row = mysql_fetch_array($result)){
if($row['field_id'] == 8){
$title = $row['meta_value'];
}
else if($row['field_id'] == 13){
$link = $row['meta_value'];
echo "<td><a href=$link target=_blank> $title </a></td>";
}
else if($row['field_id'] == 12){
$date=$row['meta_value'];
echo "<td>$date</td>";
}
else {
$place=$row['meta_value'];
echo "<td>$place</td>";
}
$i++;
}
echo "</tr>";
}
?>
</table>
but the output is really confusing.. in the first column is the venue..
the second is correct the date.. and the third is the title..
Why the display is like that?
Here's the structure of the database:
$result
NULL, false or an empty array? Are you sure wp_frm_item_metas is a valid database name to be asking$wpdb
of? Try echoing out$wpdb->wp_frm_item_metas
and see what it gives you, check that the table is in the database and is called that way. Turn on error output for both $wpdb.