srule_
10-12-2007, 07:34 PM
I have a very strange problem. When i call the img and the zip file only the zip file shows. When i call only the image it shows fine.
The Code if I am calling both:
// this is hardcoded or selected from a settings table in the database
$image_path = '/template_site/images/screenshots/';
$zip_path='http://localhost/template_site/zipped_temps/';
// make the query
$query = "SELECT CONCAT(temp_name) AS name, CONCAT(images) AS img, CONCAT(zips) AS zip, DATE_FORMAT(date_added, '%M %d, %Y') AS da FROM template ORDER BY date_added ASC";
//run the query
$result= @mysql_query($query);
//if query went ok
if ($result)
while ($row = mysql_fetch_array($result, MYSQL_ASSOC)) {
echo '<p>'.$row['name'].' on <img src="' . $image_path . $row['img'] . '" /></p>';
echo '<p><a href="'.$zip_path . $row['zip'] . ' > download here </a></p>';
}
else {
echo 'it did not work';
}
- This will only output the "download here" part
The code of i am not calling the zip
// this is hardcoded or selected from a settings table in the database
$image_path = '/template_site/images/screenshots/';
$zip_path='http://localhost/template_site/zipped_temps/';
// make the query
$query = "SELECT CONCAT(temp_name) AS name, CONCAT(images) AS img, CONCAT(zips) AS zip, DATE_FORMAT(date_added, '%M %d, %Y') AS da FROM template ORDER BY date_added ASC";
//run the query
$result= @mysql_query($query);
//if query went ok
if ($result)
while ($row = mysql_fetch_array($result, MYSQL_ASSOC)) {
echo '<p>'.$row['name'].' on <img src="' . $image_path . $row['img'] . '" /></p>';
}
else {
echo 'it did not work';
}
this works fine, everything that is called is outputed
The Code if I am calling both:
// this is hardcoded or selected from a settings table in the database
$image_path = '/template_site/images/screenshots/';
$zip_path='http://localhost/template_site/zipped_temps/';
// make the query
$query = "SELECT CONCAT(temp_name) AS name, CONCAT(images) AS img, CONCAT(zips) AS zip, DATE_FORMAT(date_added, '%M %d, %Y') AS da FROM template ORDER BY date_added ASC";
//run the query
$result= @mysql_query($query);
//if query went ok
if ($result)
while ($row = mysql_fetch_array($result, MYSQL_ASSOC)) {
echo '<p>'.$row['name'].' on <img src="' . $image_path . $row['img'] . '" /></p>';
echo '<p><a href="'.$zip_path . $row['zip'] . ' > download here </a></p>';
}
else {
echo 'it did not work';
}
- This will only output the "download here" part
The code of i am not calling the zip
// this is hardcoded or selected from a settings table in the database
$image_path = '/template_site/images/screenshots/';
$zip_path='http://localhost/template_site/zipped_temps/';
// make the query
$query = "SELECT CONCAT(temp_name) AS name, CONCAT(images) AS img, CONCAT(zips) AS zip, DATE_FORMAT(date_added, '%M %d, %Y') AS da FROM template ORDER BY date_added ASC";
//run the query
$result= @mysql_query($query);
//if query went ok
if ($result)
while ($row = mysql_fetch_array($result, MYSQL_ASSOC)) {
echo '<p>'.$row['name'].' on <img src="' . $image_path . $row['img'] . '" /></p>';
}
else {
echo 'it did not work';
}
this works fine, everything that is called is outputed