Jump to content

is this possible?


dbradbury

Recommended Posts

thanks all..

 

<?php
include("connect.php");
require("bbcode.php");
$getinfo = mysql_query("SELECT * FROM phpbb_posts WHERE forum_id='14'");
$row = mysql_fetch_assoc($getinfo);
echo nl2br(bbcode($row['post_text']));
?>
<table width="776" border="0">
  <tr>
    <td colspan="2">
<?php
$getdetails = mysql_query("SELECT * FROM $getinfo WHERE post_subject='Details'");
$row1 = mysql_fetch_assoc($getdetails);
echo nl2br(bbcode($row1['post_text']));
?>
</td>
  </tr>
  <tr>
    <td width="383"> </td>
    <td width="383"> </td>
  </tr>
  <tr>
    <td> </td>
    <td> </td>
  </tr>
  <tr>
    <td> </td>
    <td> </td>
  </tr>
  <tr>
    <td> </td>
    <td> </td>
  </tr>
</table>

 

well i think i need to do it via separate queries, as i need to get all the stuff from a forum..

then display a certain post in a certain table cell..

 

that was my attempt but it didnt like the $getinfo in the mysql query part lol.. obv lol

Link to comment
https://forums.phpfreaks.com/topic/188339-is-this-possible/#findComment-994267
Share on other sites

$getinfo is the result of a mysql_query() function call, not a string. You are using it as a string in the following code.

$getdetails = mysql_query("SELECT * FROM $getinfo WHERE post_subject='Details'");

There should be the name of a table in its place

$getdetails = mysql_query("SELECT * FROM tablename WHERE post_subject='Details'");

Link to comment
https://forums.phpfreaks.com/topic/188339-is-this-possible/#findComment-994269
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.