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
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 "
";
echo " segment1 | segment2 | segment3 |
";
echo ""; echo "$segment1"; echo " | "; echo "$segment2"; echo " | "; echo "$segment3"; echo " |
";
}
?>
4
$segment1 = mysql_result($result, "segment1");
$segment2 = mysql_result($result, "segment2");
$segment3 = mysql_result($result, "segment3");
?
WHERE segment='yes'... this is your_row=something_you_want_to_select
5
Hi,
I have inserted only 3 records and I want to display all 3 so no need to specify where at the moment. Yes you are right later I will use it but right now I just want an output.
I am also getting error,
Parse error: syntax error, unexpected '<' in c:\apache\Apache\htdocs\html\class\xoopsblock.php(146) : eval()'d code on line 1
Thanks
6
Hi All,
I am still unable to resolve my issue. Well let me write my requirement again in a more simple way,
Say I have a table "mytable" having one field "myfield" and the table contains only one record. I want to show this one record in the XOOPS block on the main page. Please guide me how to do this?
Thanks
7
Pl let me know if I have to post/move this requirement in any other forum?
342 user(s) are online (284 user(s) are browsing Support Forums)
Members: 0
Guests: 342
more...
Stats |
Goal: |
$100.00 |
Due Date: |
Nov 30 |
Gross Amount: |
$0.00 |
Net Balance: |
$0.00 |
Left to go: |
$100.00 |
|