3
Hi,
I have created a block and pasted the following code with a change in your code "removing ." WHERE segment='yes'"" but it is not showing me any result. I also set content type to "PHP Script" but no gain.
I used the following table,
create table segments_table(segment1 varchar(2), segment2 varchar(2),segment3 varchar(2));
inserted values,
insert into segments_table values ('a','b','c');
It is not even showing the block?
Will really appreciate all of you in resolving my issues.
Thanks
<?php
global $xoopsDB, $xoopsUser;
echo $xoopsDB;
if ($xoopsUser)
{
$lognom = $xoopsUser->uname();
}
$result = mysql_query("SELECT * FROM ".$xoopsDB->prefix("segments_table") );
while($row = mysql_fetch_array($result))
{
$segment1 = mysql_result($result, "t_row1");
$segment2 = mysql_result($result, "t_row2");
$segment3 = mysql_result($result, "t_row3");
echo "<table border='1'>";
echo "<tr><th><FONT FACE=arial> segment1 </th> <th><FONT FACE=arial> segment2 </th> <th><FONT FACE=arial> segment3 </th></tr>";
echo "<tr><td>";
echo "<FONT SIZE=1>$segment1</FONT>";
echo "</td><td>";
echo "<FONT SIZE=1>$segment2</FONT>";
echo "</td><td>";
echo "<FONT SIZE=1>$segment3</FONT>";
echo "</td></tr>";
}
?>