Originally posted by ronverdonk
Code:
<?
include_once('../sql_connect.php');
$result = mysql_query("SELECT A.LastName, A.TimeOut, B.image, B.LastName FROM nocsis A, image B WHERE A.LastName = B.LastName AND A.TimeOut IS NULL ORDER BY A.TimeIn DESC");
if (mysql_num_rows($result) <> B.LastName ) {
{//begin of loop
//now print the results:
echo '<table>'; // start the table.
$_counter = -1; // We start 'outside' the Matrix. Unlike Neo.
$_cols = 4; // 4 columns. Of the Ionic variety.
while($myrow = mysql_fetch_array($result)){ //get array of table.
// Advance the counter and determine our 'position';
$_pos = ( ++$_counter % $_cols );
// Should we output a '<tr>'?
if( $_pos === 0 )
{
echo '<tr>';
}
/// This will create link on picture to search for user on inside.spherion.com ////
/// Still working on how to simply put 5-2 and pull image from inside.spherion.com at the myrow[image] call ////
echo "
<td>
<a href=\"http://inside.spherion.com/Search.aspx?k={$myrow['LastName']}&s=Search%20People\" target=\"_blank\">
<img src=\"" . $myrow['image']."\" /></a>
<b><br>Last Name:</b>
{$myrow['LastName']}
</td>"; // echoing out the image
// Should we output a '</tr>'?
if( $_pos === $_cols - 1 )
{
echo '</tr>';
}
}
if( $_counter % $_cols !== $_cols - 1 )
{
do
{
echo '<td style="visibility: hidden"> </td>';
}
while( ++$_counter % $_cols !== $_cols - 1 );
echo '</tr>';
}
echo '
</table>';
} //end of loop
} // End IF
else {
("SELECT LastName FROM nocsis WHERE LastName NOT IN (Select LastName FROM image) AND TimeOut IS NULL ORDER BY TimeIn DESC");
}
?>
Comment