|  | Posted by Jerry Stuckle on 07/26/06 22:31 
Chris wrote:>>What happens if you add the following:
 >>
 >>echo "<pre>\n";
 >>print_r($row_search);
 >>echo "</pre>\n";
 >>
 >>after your mysql_fetch_assoc?  It will tell you the each of the indexes
 >>and their contents.
 >>
 >
 >
 > I get:
 >
 > Array
 > (
 >     [docURL] => index.php
 >     [docTitle] => Debug Home
 >     [docDesc] => Home page of Debug Tools team
 >     [projID] => 1
 >     [groupCode] => common
 >     [projCode] => Home
 >     [catName] => General
 > )
 >
 > If I take out the 'docs.' in the $row_search['docs.projID'] (or proj.projID)
 > my <a href> links don't work for docs in the '1' proj (projID which is
 > projCode 'Home').  When I change the query as noted below I also lose it.
 > If I assign a variable to the $row_search['docs.projID'] (or
 > proj.projID)>>>> $projid = $row_search['proj'], then do the if statement
 > with the variable (if ($proj == 1) ), my links all work, but I get and
 > undefined variable error.
 >
 > But I think we're on the right track.  I have changed it back and forth a
 > few times and haven't given up yet.  I may need to change the entire section
 > of code..as the code for other tables of links listed seem to work just
 > fine.  But they don't have if statements - BTW, I have tried using other
 > operators with no luck.  I've also used the projCode parameter (if
 > $row_search['projCode'] == 'Home') with no help.
 >
 > Thanks,
 >
 > Chris
 >
 
 Chris,
 
 it needs to be $row_search['proj_id'] - just like it is in the output of
 print_r().
 
 >
 >>My suspicion is that 'docs.projID' is not a valid index.  Probably
 >>'projID'.
 >>
 >>You can also specify a name for it such as:
 >>
 >>$query_search = "SELECT Distinct docURL, docTitle, docDesc,
 >>docs.projID AS projID ...
 >>
 >>Then it will be $row_search['projID']
 >>
 >>
 >>--
 >>==================
 >>Remove the "x" from my email address
 >>Jerry Stuckle
 >>JDS Computer Training Corp.
 >>jstucklex@attglobal.net
 >>==================
 >
 >
 >
 
 
 --
 ==================
 Remove the "x" from my email address
 Jerry Stuckle
 JDS Computer Training Corp.
 jstucklex@attglobal.net
 ==================
 [Back to original message] |