Jump to content


Photo

whats wrong with this????


  • Please log in to reply
2 replies to this topic

#1 zsxdcfv21

zsxdcfv21
  • Members
  • PipPip
  • Member
  • 14 posts

Posted 30 August 2006 - 06:13 AM

everytime i visit my link, for example this kind of URL http://www.mywebsite...es&BuyerID=1068

case 'notes':

$q = "
SELECT n.BuyerNoteID,
      n.Note,
      date_format(n.Created, '%d %b %y')  nCreated,
      date_format(n.Created, '%d %b %y') nModified
 
FROM BuyerNote n
JOIN Buyer b
  ON b.BuyerID = n.BuyerID
AND b.BuyerID = '{$_GET['BuyerID']}'
JOIN User u
  ON b.UserID = u.UserID
";
if (!$isAdmin)
$q .= " AND u.UserID = '{$_SESSION['UserID']}' ";

$q .=" ORDER BY n.Created DESC";

$db->execute($q);

if ( true == $db->resultHasRows() ) {
require_once('func.buyernote.php');
$notes = '';
while ( false != ($r = $db->getObject()) ) {
$notes .= makeNote($r->BuyerNoteID, nl2br($r->Note), $r->nCreated, $r->nModified);
}
} else {
$notes = 'No Notes to Display.';
}

$o = $db->executeOrDie("
select concat(Firstname, ' ', Surname) Name
from Buyer
where BuyerID = '{$_GET['BuyerID']}'
");

// alterted this 18 august
if (!$isSubAdmin)
$html->setAction("note_add&BuyerID=".$_GET['BuyerID'], 'Add a Note');
$html->setHeading('View Notes for ' . $o->Name);
$html->bindContent($notes);
$html->useBackButton($_SERVER['PHP_SELF']);
$html->printHTML();
$html->serialise();
break;


... it gives me a blank. no errors or whatsoever, its purely blank. the script for 'func.buyernote.php' are the ff:


<?

function makeNote ($id, $note, $created) {
global $isSubAdmin;
$note = <<<endh
<table class="note">
<tr>
<td valign="top" width="75" class="date"><b>$created</b></td>
<td valign="top" class="text" rowspan="2">$note</td>
</tr>
<tr>
<td valign="bottom">
endh;
if ( ! $isSubAdmin )
{
$note .= <<<endh
<a href="buyer.php?action=note_edit&BuyerNoteID=$id">Edit</a> |
<a href="buyer.php?action=note_remove&BuyerNoteID=$id">Delete</a>
endh;
}
$note .= "</td></tr></table><br>";
return $note;
}

?>


can anyone tell me whats wrong??? =(

#2 Jenk

Jenk
  • Members
  • PipPipPip
  • Advanced Member
  • 778 posts

Posted 30 August 2006 - 09:00 AM

Turn all error reporting on
<?php error_reporting(E_ALL); ini_set('display_errors', 'On'); ?>
and see what you get.

#3 AdRock

AdRock
  • Members
  • PipPipPip
  • Advanced Member
  • 911 posts

Posted 30 August 2006 - 10:28 AM

Try chnaging this
date_format(n.Created, '%d %b %y')  nCreated,
date_format(n.Created, '%d %b %y') nModified

to this
date_format(n.Created, '%d %b %y')  as nCreated,
date_format(n.Created, '%d %b %y') as nModified

I had to do this for a date I was using to format it how i wanted
If your topic has been solved, please mark the topic as SOLVED.

This helps others from identifying which topics need help still




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users