I have a simple query, but I'm looking for the error for some time now. The only thing I can think of that it would have a problem with connecting to the database, but that can't be right, because it is working on other parts of the website.
This is the db-connection:
$dbwebwinkel = mysql_connect("localhost", "abcdef", "123456") or die(mysql_error());
$db1 =mysql_select_db('abcdef', $dbwebwinkel) or die(mysql_error());
This is the error message:
There is something wrong in the search-query ( SELECT prod_omschrijving.producttitel, prod_omschrijving.idproduct AS 'idproductom', producten.idproduct AS 'idproductprod', producten.productlink FROM prod_omschrijving FULL OUTER JOIN producten ON producten.idproduct=prod_omschrijving.idproduct WHERE prod_omschrijving.idproduct IS NULL OR producten.idproduct IS NULL)
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'OUTER JOIN producten ON producten.idproduct=prod_omschrijving.idproduct W' at line 8
Warning: mysql_fetch_array() expects parameter 1 to be resource, boolean given in /home/s010485/domains/jcsl.nl/public_html/medewerkers/paginas/boekingen/producten.php on line 61
This is the script.
$qry = "
SELECT
prod_omschrijving.producttitel,
prod_omschrijving.idproduct AS 'idproductom',
producten.idproduct AS 'idproductprod',
producten.productlink
FROM
prod_omschrijving
FULL OUTER JOIN
producten
ON
producten.idproduct=prod_omschrijving.idproduct
WHERE
prod_omschrijving.idproduct IS NULL
OR
producten.idproduct IS NULL";
$sql = mysql_query($qry, $dbwebwinkel);
$sql = mysql_query($qry, $dbwebwinkel);
if($sql === false)
{
echo (" Er gaat iets mis in de zoekquery (".$qry .")".mysql_error($dbwebwinkel));
}
else
{
WHILE ($lijstje = mysql_fetch_array($sql))
{
echo $lijstje['idproductom'];
}
}