Skip to main content
Inspiring
August 2, 2006
Answered

issue with layout / repeat region part 2..

  • August 2, 2006
  • 1 reply
  • 561 views
Seems I haven't cracked this just yet - basically have a details page that is split into three - with a candidate's details at the top left, their work profile at the top right, with a long CV text appearing below both.

All the fields are from the Candidates table, except the profiles - so the profiles need to be a repeat region to list them all.

I can't for the life of me get the layout to work as I'd like - it's as tho' anything appearing afer the repeat region won't display.

See here :

link

Below the CV header the CV field should appear - as in :

<tr>
<td colspan="2" valign="top" class="labelcell">CV</td>
</tr>
<tr>
<td class="profilecell"><?php echo $row_Candidates['CV']; ?></td>
</tr>

But when you view source, the <?php echo $row_Candidates['CV']; ?> is AWOL, and appear as :

<tr>
<td colspan="2" valign="top" class="labelcell">CV</td>
</tr>
<tr>
<td class="profilecell"></td>
</tr>

Anyone spot what's up here?

Just as I thought I had this page's layout done and dusted, as usual, there had to be something not quite right!

Iain
This topic has been closed for replies.
Correct answer johngordon12
Good news! I've managed to fix both the issues with this page, by simply adding a second, simple recordset that just queries the Candidates table. By doing that, it means that Candidates with no Profiles yet attached display, and has fixed the glitch with the fields not displaying into the bargain.

So the next thing is figuring out the page to add/attach Profiles to the Candidates.

Iain

1 reply

Inspiring
August 3, 2006
what does your code look like? what languages are you using?

You said all fields were created from the Candidates table - so that means
the left and bottom sections, yet?

The profiles section is fed by another table, yes? What's your SQL look
like for this? Are you searching by userID, by userClass,. how are you
determininig what profieles are assocaited with what Person?

What does your recordset produce when you test it?
"Iain71" <webforumsuser@macromedia.com> wrote in message
news:ear8dl$ae3$1@forums.macromedia.com...
> Seems I haven't cracked this just yet - basically have a details page that
> is
> split into three - with a candidate's details at the top left, their work
> profile at the top right, with a long CV text appearing below both.
>
> All the fields are from the Candidates table, except the profiles - so the
> profiles need to be a repeat region to list them all.
>
> I can't for the life of me get the layout to work as I'd like - it's as
> tho'
> anything appearing afer the repeat region won't display.
>
> See here :
>
> http://www.searchtechuk.com/database/candidateDetails4.php
>
> Anyone spot what's up here
>
> Iain
>


Inspiring
August 3, 2006
quote:

what does your code look like? what languages are you using?


I'm using PHP/mySQL

This is the current PHP at the top of the page :

<?php require_once('../Connections/connSearchTechUK.php'); ?>
<?php
$maxRows_Candidates = 10;
$pageNum_Candidates = 0;
if (isset($_GET['pageNum_Candidates'])) {
$pageNum_Candidates = $_GET['pageNum_Candidates'];
}
$startRow_Candidates = $pageNum_Candidates * $maxRows_Candidates;

$colname_Candidates = "1";
if (isset($_GET['CandidateID'])) {
$colname_Candidates = (get_magic_quotes_gpc()) ? $_GET['CandidateID'] : addslashes($_GET['CandidateID']);
}
mysql_select_db($database_connSearchTechUK, $connSearchTechUK);
$query_Candidates = sprintf("SELECT * FROM Profiles INNER JOIN (Candidates INNER JOIN CandidateProfiles ON Candidates.CandidateID = CandidateProfiles.CandidateID) ON Profiles.ProfileID = CandidateProfiles.ProfileID WHERE Candidates.CandidateID = %s", $colname_Candidates);
$query_limit_Candidates = sprintf("%s LIMIT %d, %d", $query_Candidates, $startRow_Candidates, $maxRows_Candidates);
$Candidates = mysql_query($query_limit_Candidates, $connSearchTechUK) or die(mysql_error());
$row_Candidates = mysql_fetch_assoc($Candidates);

if (isset($_GET['totalRows_Candidates'])) {
$totalRows_Candidates = $_GET['totalRows_Candidates'];
} else {
$all_Candidates = mysql_query($query_Candidates);
$totalRows_Candidates = mysql_num_rows($all_Candidates);
}
$totalPages_Candidates = ceil($totalRows_Candidates/$maxRows_Candidates)-1;
?>

The data is being displayed using PHP echo lines, eg :

<?php echo $row_Candidates['FirstName']; ?>

quote:

You said all fields were created from the Candidates table - so that means
the left and bottom sections, yet?

The profiles section is fed by another table, yes? What's your SQL look
like for this? Are you searching by userID, by userClass,. how are you
determininig what profieles are assocaited with what Person?


Yup - basically a Candidates table, and a Profiles table, looking up on CandidateID - the SQL looks like :

SELECT *
FROM Profiles INNER JOIN (Candidates INNER JOIN CandidateProfiles ON Candidates.CandidateID = CandidateProfiles.CandidateID) ON Profiles.ProfileID = CandidateProfiles.ProfileID
WHERE Candidates.CandidateID = colname

quote:

What does your recordset produce when you test it?


The recordset looks fine - in the code 'FirstName' displays correctly near the top amongst the main details, but it should also appear immediately to the left of "'s CV' - the code in the page is exactly the same (as it should be, as the field is just dragged into place from the bindings panel) as :

<tr>
<td colspan="2" valign="top" class="labelcell"><?php echo $row_Candidates['FirstName']; ?>'s CV</td>
</tr>

It (and the 'CV' field) display fine when there's no repeat region on the 'Profile' field, but as soon as I add the repeat region, the go AWOL.

Iain