Advertisement
Advertisement
| 04.02.2008 at 07:56AM PDT, ID: 23289507 |
|
[x]
Attachment Details
|
||
1: 2: 3: 4: 5: 6: 7: 8: 9: 10: 11: 12: 13: 14: 15: 16: 17: 18: 19: 20: |
<?php
$sql = "SELECT
company.id AS current,
(SELECT MIN(company.id) AS nextRecord FROM company WHERE company.id > '$currentrow') AS next,
(SELECT MAX(company.id) AS prevRecord FROM company WHERE company.id < '$currentrow') AS prev,
info.id, info.status
FROM
company, info
WHERE
company.id = '$currentrow' AND info.id = '$currentrow'";
$result = mysql_query($sql) or die("INVALID QUERY: " . mysql_error());
while($row = mysql_fetch_assoc($result))
{
echo "" . $row['status'] . ""; //only display this if the column 'status' = 1 & instead of showing 1, display this message: "CLOSED"
}
?>
|