This topic is locked
[SOLVED]

 Image thumb on the fly script creates errors by PHPR 6.0

11/13/2011 8:35:52 AM
PHPRunner General questions
N
Nelson author

Hi,
I have used this script in previous versions of PHPR but in 6.0 is showing an error on the view page:
The script that suppose to show the first image if existed and no_image.gif if the image doesn't exist
The script is placed in the events > view page > before display

global $conn,$strTableName;

if (@$_REQUEST["editid1"])

{

$data = CustomQuery("select * from ".$strTableName." where USAadsID=".$_REQUEST["editid1"]);

$rstt = db_fetch_array($data);

$pic="";

if($rstt["Image1"]!="")

$pic=$rstt["Image1"];

else if($rstt["Image2"]!="")

$pic=$rstt["Image2"];

else if($rstt["Image3"]!="")

$pic=$rstt["Image3"];

if($rstt["Image4"]!="")

$pic=$rstt["Image4"];

else if($rstt["Image5"]!="")

$pic=$rstt["Image5"];

else if($rstt["Image6"]!="")

$pic=$rstt["Image6"];

else if($rstt["Image7"]!="")

$pic=$rstt["Image7"];

if($pic=="")

$xt->assign("row00firstphoto_value",htmlspecialchars("/images/no_image.gif"));

else

$xt->assign("row00firstphoto_value",htmlspecialchars(AddLinkPrefix("Image1",$pic)));

}


I uploaded the view page to the demo account:

http://demo.asprunner.net/metallica777_hotmail_com/Icon_Ads_USA/Ads_USA_view.php?editid1=5
Thanks in advanced

N
nramerstenfer 11/13/2011

cat liquid zithromax zithromax dosing pediatric

fever from taking zithromax mixing alcohol with azithromycin drink

http://azithromycin-online.weebly.com zithromax price

Sergey Kornilov admin 11/13/2011

Use wrappers around table name in your query (table name has spaces in it).

$data = CustomQuery("select * from `".$strTableName."` where USAadsID=".$_REQUEST["editid1"]);
N
Nelson author 11/13/2011

Hi Sergey,
Thanks very much...the problem was solved
Have a good day!