PHP beginner |
|
Hallo!
Ik heb de volgende query:
<?php
$query = "
SELECT
variety.name AS vname,
flowers.id AS fid,
flowers.name AS fname,
flowers.type,
flowers.floweringtime,
season.name AS seasonname,
flowers.colour AS fcolour,
flowers.description
flowers.artikelnrg,
flowers.artikelnrk,
flowers.bulbsize1,
flowers.qty1,
flowers.price1,
flowers.bulbsize2,
flowers.qty2,
flowers.price2,
flowers.special,
flowers.price12,
flowers.price22
FROM
flowers
WHERE
flowers.id = $id
LEFT JOIN
variety
ON
flowers.variety_id = variety.id
LEFT JOIN
flowers.season_id = season.id";
?>
<?php $query = " SELECT variety.name AS vname, flowers.id AS fid, flowers.name AS fname, flowers.type, flowers.floweringtime, season.name AS seasonname, flowers.colour AS fcolour, flowers.description flowers.artikelnrg, flowers.artikelnrk, flowers.bulbsize1, flowers.qty1, flowers.price1, flowers.bulbsize2, flowers.qty2, flowers.price2, flowers.special, flowers.price12, flowers.price22 FROM flowers WHERE flowers.id = $id LEFT JOIN variety ON flowers.variety_id = variety.id LEFT JOIN flowers.season_id = season.id"; ?>
En hij geeft de volgende foutmelding:
Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /home/vhosting/2/directbulbs.nl/www/_include/DBM.class.php on line 44
Ik ben niet zo geweldig met JOINS, en daarom snap ik dus ook niet wat ik fout doe. Ik heb al wat dingen proberen te veranderen, maar het lukt maar niet. Zou iemand me kunnen helpen?
Alvast bedankt!
|