Jump to content

Mr Chris

Members
  • Posts

    336
  • Joined

  • Last visited

    Never

Everything posted by Mr Chris

  1. That's the thing though, if I just do a simple: Select * from reports It works with no problem??
  2. Hi All, I am trying to join three tables with this query: select pl.player_name AS the_player, pl.player_id, s.report_id from players as pl left outer join player_stats as s on s.player_id = pl.player_id left outer join r.reports as r on r.report_id = s.report_id where pl.player_id = 22 However I get the message: SELECT command denied to user 'my_user_name'@'localhost' for table 'reports' However if I just do it without the last join e.g. just a two table: select pl.player_name AS the_player, pl.player_id, s.report_id from players as pl left outer join player_stats as s on s.player_id = pl.player_id where pl.player_id = 22 It works fine, so it's getting lost somewhere here on the third join: left outer join r.reports as r on r.report_id = s.report_id But cant see where? Any ideas? Thanks
  3. Hello, I'm trying to put together a function but am getting the message: Parse error: syntax error, unexpected $end at the end of the function. I know this normally happens when the { and } don't match up, but unless i'm going bonkers they do? Any ideas? Thanks <? function FuncName() { $total = 0; $output = '<form action="" method="post"> <input type="hidden" name="aaa" value="bbb"> <input type="hidden" name="fff" value="1"> <input type="hidden" name="ddd" value="666666k">'; foreach ($this->Cart as $ProductID => $Qty){ $result = $Database->query('SELECT * FROM books WHERE id = '.$ProductID); $row = $result->fetch(); $price = sprintf('£%.2f', $row['price']); $rowTotal = sprintf('£%.2f', $row['price'] * $Qty); $total += $row['price'] * $Qty; $output .= <<<ROW <input type="hidden" name="one_{$ProductID}" value="{$description}"> <input type="hidden" name="two_{$ProductID}" value="{$rowTotal}"> <input type="hidden" name="three_{$ProductID}" value="{$Qty}"> ROW; } $total = sprintf('£%.2f', $total); $output .= <<<END <input type="submit" value="Submit"> </form> END; return $output; } } ?>
×
×
  • Create New...

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.