Jump to content


This topic is now archived and is closed to further replies.


whats wrong with this????

Recommended Posts

everytime i visit my link, for example this kind of URL http://www.mywebsitehere.com/app/buyer.php?action=notes&BuyerID=1068

case 'notes':

$q = "
SELECT n.BuyerNoteID,
      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";


if ( true == $db->resultHasRows() ) {
$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);

... 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">
<td valign="top" width="75" class="date"><b>$created</b></td>
<td valign="top" class="text" rowspan="2">$note</td>
<td valign="bottom">
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>
$note .= "</td></tr></table><br>";
return $note;


can anyone tell me whats wrong??? =(

Share this post

Link to post
Share on other sites
Turn all error reporting on [code=php:0]<?php error_reporting(E_ALL); ini_set('display_errors', 'On'); ?>[/code] and see what you get.

Share this post

Link to post
Share on other sites
Try chnaging this
[code]date_format(n.Created, '%d %b %y')  nCreated,
date_format(n.Created, '%d %b %y') nModified[/code]

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

I had to do this for a date I was using to format it how i wanted

Share this post

Link to post
Share on other sites


Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.