Created
February 7, 2013 07:21
-
-
Save shahariaazam/4729174 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$stmt = $pdo->prepare("SELECT ItemSales.date, | |
ItemSales.price, | |
ItemSales.price * ItemSales.quantity as earnings | |
FROM ItemSales as sales,Items | |
WHERE ItemSales.itemId = Items.id | |
AND Items.id = :Items_id"); // Note: :Items.id change to :Items_id | |
$stmt->bindParam(':Items_id', $id); // Note: 'Items.id' change to ':Items_id' | |
$stmt->execute(); | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment