I have been trying to find the answer on the postnuke forums and I have even
tried Sitepoint but I am unable to find an answer. So now I am asking here
in hopes that someone may have an idea
I am trying to put a query in a PHP block. However, when I do.. the block
dissapears.
I will try to explain better..
If I use a query like
$result = mysql_query("En ter Array Query Here");
while ( $row = mysql_fetch_arr ay($result) )
{
ENTER CODE HERE
}
The block does not show up (I KNOW the query and code is good because it
works on a seperate page)
However, queries like the following do work
$query = mysql_query("EN TER QUERY HERE");
$result = mysql_result($q uery, 0, 0);
Basically.. as soon you use a query with the line of "while ( $row =
mysql_fetch_arr ay($result) )" the block does not show up anymore. As I
said before, I know the query is good and it works, cause I have tested it
on seperate pages and have even used the most basic of queries.
When I say dissapear.. I do mean exactly that. If you use the 2nd query
that I posted.. you can see the block on the front page. As soon as I
change it to the other kind of query the block dissapears and is no longer
visable.
Anyone have any ideas? Or maybe have another way that I can accomplish the
query that I am trying to get without using hte "while.." line? Basically
I am trying to get FirstName, LastName and SUM(Posts) out of a table and
sort them by SUM(Posts), keeping the top 3
Thanks
tried Sitepoint but I am unable to find an answer. So now I am asking here
in hopes that someone may have an idea
I am trying to put a query in a PHP block. However, when I do.. the block
dissapears.
I will try to explain better..
If I use a query like
$result = mysql_query("En ter Array Query Here");
while ( $row = mysql_fetch_arr ay($result) )
{
ENTER CODE HERE
}
The block does not show up (I KNOW the query and code is good because it
works on a seperate page)
However, queries like the following do work
$query = mysql_query("EN TER QUERY HERE");
$result = mysql_result($q uery, 0, 0);
Basically.. as soon you use a query with the line of "while ( $row =
mysql_fetch_arr ay($result) )" the block does not show up anymore. As I
said before, I know the query is good and it works, cause I have tested it
on seperate pages and have even used the most basic of queries.
When I say dissapear.. I do mean exactly that. If you use the 2nd query
that I posted.. you can see the block on the front page. As soon as I
change it to the other kind of query the block dissapears and is no longer
visable.
Anyone have any ideas? Or maybe have another way that I can accomplish the
query that I am trying to get without using hte "while.." line? Basically
I am trying to get FirstName, LastName and SUM(Posts) out of a table and
sort them by SUM(Posts), keeping the top 3
Thanks
Comment