|
Posted by Jerry Stuckle on 07/30/06 03:27
dawnerd wrote:
> Jerry Stuckle wrote:
>
>>dawnerd@gmail.com wrote:
>>
>>>Hi, I am developing a CMS and came across something which has never
>>>happened to me before, and I re-wrote the specific script twice, both
>>>differently, and still had the same error.
>>>
>>>I'm not sure if it is apache, or php, or just an error I am not seeing.
>>>
>>>here is the code:
>>> <?php
>>> /**
>>> * Loop through the resultset
>>> */
>>> $int = 0;
>>> while( $row = $db->fetcharray( $query ) )
>>> {
>>> if( $int == 0 )
>>> {
>>> $class = "page_table1";
>>> $int++;
>>> }
>>> else
>>> {
>>> $class = "page_table2";
>>> $int = 0;
>>> }
>>>
>>> if( $row["type"] == "error" )
>>> {
>>> $img = "emblem-important-small.png";
>>> }
>>> else
>>> {
>>> $img = "text-x-generic.png";
>>> }
>>> ?>
>>> <tr class="<?php echo $class; ?>">
>>> <td><a
>>>href="index3.php?page=pagemanager&do=edit&id=<?php echo
>>>$row["id"]; ?>">
>>> <img src="images/emblem-unreadable.png" width="16" height="16"
>>>border="0" /></a></td>
>>> <td><a
>>>href="index3.php?page=pagemanager&do=edit&id=<?php echo
>>>$row["id"]; ?>">
>>> <img src="images/accessories-text-editor.png" alt="Edit" width="16"
>>>height="16" /></a></td>
>>> <td><?php echo $row["id"]; ?></td>
>>> <td><?php echo $row["title"]; ?></td>
>>> <td><?php echo $row["slug"]; ?></td>
>>> <td><img src="images/<?php echo $img; ?>" title="<?php echo
>>>$row["type"]; ?>" style="float:left;" />
>>> <?php echo $row["type"]; ?></td>
>>> </tr>
>>>
>>> <?php
>>> }
>>> ?>
>>>
>>>The output just stops when the while loop is done executing. Any help
>>>would be greatly appreciated.
>>>
>>
>>
>>I guess I'm not sure what you expect to happen. It looks to me like
>>when the loop is done executing your go to the end of the page, do not
>>pass go and do not collect 200 cpu cycles.
>>
>>IOW - unless I'm missing something, there isn't anything after your
>>loop. What do you expect to happen?
>>
>>--
>>==================
>>Remove the "x" from my email address
>>Jerry Stuckle
>>JDS Computer Training Corp.
>>jstucklex@attglobal.net
>>==================
>
> It is supposed to show the rest of the html on the page, and a few
> other lines of php used for logging and such, but it works on other
> pages, so I know that they are not the problem.
>
But you haven't shown anything else, so how are we supposed to help with
your problem?
--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@attglobal.net
==================
Navigation:
[Reply to this message]
|