1
talunceford
Help with some code here.....

I am having a tad bit of trouble with some code that I am working on. The problem is, is that when I array the data, it doesn't show all of the queried results. For example. If I have 3 links stored, it will only show two, but if I have 4 it will only show 3.

I need someone to look over the code and see what I could be doing wrong.

function myxlinks(){
global 
$xoopsUser$HTTP_COOKIE_VARS$xoopsConfig,$xoopsTheme;
global 
$xoopsDB;
include_once(
XOOPS_ROOT_PATH."/class/module.errorhandler.php");
include_once(
XOOPS_ROOT_PATH."/include/xoopscodes.php");
$uid $xoopsUser->getVar("uid");
$q "SELECT lid, url, title, type FROM ".$xoopsDB->prefix("myxlinks_favorites")." WHERE uid = '$uid'";
$result $xoopsDB->query($q) or die("");
$row_xoops_myxlinks_favs mysql_fetch_assoc($result);
$totalRows_xoops_myxlinks_favs mysql_num_rows($result);
if (
$totalRows_xoops_myxlinks_favs 0) {
                
$block = array();
                
$block['title'] = "Personal Links";        
                
$block['content'].=  "";
                
$block['content'].=  "";
                
$block['content'].=  "";
                while (
$myrow $xoopsDB->fetchArray($result)){
                
$type $myrow['type'];
                
$url $myrow['url'];
                
$title $myrow['title'];
                
$block['content'].=  "$type$url target=_blank>$title";
                }
                
$block['content'].=  "";
                
$block['content'].=  "
.XOOPS_URL."/modules/myxlinks/showlinks.php'>Edit Links";
                }else{
                
$block['content'].=  "You do not have any
"
;
                
$block['content'].=  "links setup, would you
"
;
                
$block['content'].=  "like to set up some
"
;
                
$block['content'].=  "personal Links? >>.XOOPS_URL."/modules/myxlinks/showlinks.php'>Yes<<";
                
                }
                return 
$block;
}
?>


It is throwing a curve ball at me.....

Thanks for the help,

2
talunceford
Re: Help with some code here.....

Never Mind.... I got it figured out....

Login

Who's Online

779 user(s) are online (61 user(s) are browsing Support Forums)


Members: 0


Guests: 779


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Jul 31
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits