Export zákazníků

connect_errno) { // The connection failed. What do you want to do? // You could contact yourself (email?), log the error, show a nice page, etc. // You do not want to reveal sensitive information // Let's try this: echo "Sorry, this website is experiencing problems."; // Something you should not do on a public site, but this example will show you // anyways, is print out MySQL error related information -- you might log this echo "Error: Failed to make a MySQL connection, here is why: \n"; echo "Errno: " . $mysqli->connect_errno . "\n"; echo "Error: " . $mysqli->connect_error . "\n"; // You might want to show them something nice, but we will simply exit exit; } if (!$result = $mysqli->query("SET NAMES 'utf8' COLLATE 'utf8_general_ci' ")) { echo "Sorry, the website is experiencing problems."; exit; } if (!$result = $mysqli->query("SET COLLATION_CONNECTION='utf8_general_ci'")) { echo "Sorry, the website is experiencing problems."; exit; } $sql = "SELECT * FROM ps_customer c JOIN ps_address a ON c.id_customer = a.id_customer WHERE c.active=1 AND a.active=1" ; //$sql="Show table status"; if (!$result = $mysqli->query($sql)) { echo "Sorry, the website is experiencing problems."; exit; } //echo " echo ''; while ($cust = $result->fetch_assoc()) { echo ''; echo '"; echo '"; echo '"; echo '"; echo '"; echo ''; } echo '
Jméno Email Firma Adresa1 Adresa2 Město PSČ
' . $cust['firstname']. " ". $cust['lastname'] . "' . $cust['email']. "' . $cust['company']. "' . $cust['address1']. " ". $cust['address2'] . "' . $cust['city']. "". $cust['postcode'] . "
';