mysql - SQL query and output in PHP does not work - 500 Internal Server Error -


i try put working sql query in php-file cronjob. receive blank 500 internal server error notification.

the sql query works fine in phpmyadmin.

here code:

<?php     $con=mysqli_connect("host","dbuser","dbpw","dbname");     // check connection     if (mysqli_connect_errno())       {       echo "failed connect mysql: " . mysqli_connect_error();       }      $result = mysqli_query($con,"select oc_order_product.order_id bestellnr, oc_order_product.quantity, oc_order_product.model, oc_order_product.name, oc_order.shipping_company, oc_order.shipping_firstname, oc_order.shipping_lastname, oc_order.shipping_city oc_order_product, oc_order oc_order.order_id = oc_order_product.order_id , oc_order.order_status_id = 1 order bestellnr, model");      while($row = mysqli_fetch_array($result))       {       echo $row['oc_order_product.order_id'] . "; " . $row['oc_order_product.quantity'] "; " . $row['oc_order_product.model'] "; " . $row['oc_order_product.name'] "; " . $row['oc_order.shipping_company'] "; " . $row['oc_order.shipping_firstname'] "; " . $row['oc_order.shipping_lastname'] "; " . $row['oc_order.shipping_city']; //these fields have stored in database table       echo "<br />";       }      mysqli_close($con);     ?> 

the error_log empty. wrong code? error message, receive via mail ist:

status: 500 internal server error x-powered-by: php/5.6.19 content-type: text/html; charset=utf-8

any idea? thanx

i can note incorrect:

$row['oc_order_product.order_id'] 

the row has no column name. in fact, have explicitly given column name bestellnr. so, might try:

$row['bestellnr'] 

i can't guarantee problem, though.


Comments

Popular posts from this blog

php - How to add and update images or image url in Volusion using Volusion API -

javascript - jQuery UI Splitter/Resizable for unlimited amount of columns -

javascript - IE9 error '$'is not defined -