Hi once again.
We have just changed our ISP and things that worked fine now do not, Obviously its in the differences of MYSQL and PHP versions.
Have fixed most of the problems but this UPDATE routine has got me foxed.
Its giving error from the mysql_query section in the form of
Could anyone push me in thr right direction please
We have just changed our ISP and things that worked fine now do not, Obviously its in the differences of MYSQL and PHP versions.
Have fixed most of the problems but this UPDATE routine has got me foxed.
Code:
<?PHP
// update.php
require("./resources/globals.php") ;
require("./resources/common.php") ;
//echo $detail;
//echo $passdata;
//echo $key;
$updateStmt = "Update Garant SET
akey='$akey',
Ref='$Ref',
Broker='$Broker',
Brokerphone='$Brokerphone',
Brokeremail='$Brokeremail',
Comments='$Comments',
BGComments='$BGComments',
Price='$Price',
Location='$Location',
Town='$Town',
smallpic='$smallpic',
Pic1='$Pic1',
Pic2='$Pic2',
Pic3='$Pic3',
Pic4='$Pic4',
Portfolio='$Portfolio',
Size='$Size',
Condition='$Condition',
Plotsize='$Plotsize',
Roadaccess='$Roadaccess',
Distance='$Distance',
type='$type',
Electricity='$Electricity',
Water='$Water',
garage='$garage',
bedrooms='$bedrooms',
Kitchen='$Kitchen',
Status='$Status',
WC='$WC' WHERE akey = '$akey' ";
// Connect to the Database
if (!($link=mysql_connect($location,$userName,$password))) {
DisplayErrMsg(sprintf("error connecting to host %s, by user %s",$location,$userName)) ;
exit() ;
}
// Select the Database
if (!mysql_select_db($dbname, $link)) {
DisplayErrMsg(sprintf("Error in selecting %s database", $dbname)) ;
DisplayErrMsg(sprintf("error:%d %s", mysql_errno($link), mysql_error($link))) ;
exit() ;
}
// Execute the Statement
if (!mysql_query($updateStmt, $link)){
// Execute the Statement/if (!mysql_query($updateStmt, $link)) {
DisplayErrMsg(sprintf("Error in executing %s stmt", $updateStmt)) ;
DisplayErrMsg(sprintf("error:%d %s", mysql_errno($link), mysql_error($link))) ;
exit() ;
}
echo $updateStmt;
GenerateHTMLHeader("The entry was modified succesfully");
ReturnToDisplay( );
?>
Error in executing Update Garant SET akey='120',Ref= 'D127',Broker=' Dilyana',Broker phone=' +359xxxxxxxxx +359xxxxxxxxx ',Brokeremail=' dilyana@example .net',Comments= 'Traditional Bulgarian house in a village 22 km south east of Veliko Tarnovo. This aristocratic property has been a shop (the front two premises faced to the main street of the village). The house consists of two attached parts. The ground floor of the first one is a large stone cellar (water inside), connected to the former shop with internal stairs. The first floor consists of 3 rooms in good condition. The second part of the house consists of 2 rooms on the ground floor and another 2 rooms on the first floor with beautiful view of Elena Mountain. Shower room attached to the second part. A barn finishes the building. There are 3 fireplaces in the house. Private garden 400 sq m with car space. Fruit trees and vines. Price: 21000 EUR',BGComments ='?????°?????†? ????????° ?±???»???°????? ??° ?????‰?° ?? ???µ?»?? 22 ???? ?????????·?‚??? ‡???? ???‚ ?’?µ?»?????? ??????????????. ?’ ???????°?»???‚? ? - ???????‚ ???° ?°???????‚????? ??°?‚??, ?????‰?°?‚?° ?µ ?±???»?° ???°???°?·???? ?? ?????µ ???????µ?‰?µ??? ??? ?????? ???»?°?????°?‚? ° ???»???†?° ???° ???µ?»???‚??. ?????‰?°, ???????‚?????‰? ° ???µ ???‚ 2 ?????????·?°??? ? ?‡?°???‚??: ???°?·?µ ?? ?????‚???µ????? ° ???????·???° ?????? ?±?????????? ???°???°?·???? ?? 3 ???‚?°?? ?? ?????????? ?????±???? ???????‚??????? ??µ ???° ???‚?????? ?µ?‚?°?¶. ?’?‚?????°?‚?° ?‡?°???‚ ???° ?????‰?°?‚?° ?????° 2 ???‚?°?? ???° ?????????? ?µ?‚?°?¶ ?? ?????µ ???‚?°?? ???° ???‚?????? ?µ?‚?°?¶, ???‚???????µ?‚? ? ???µ ???°?·????????? ° ?????°???????° ???»?µ?????° ?????? ?•?»?µ????????? ? ?±?°?»???°??. ?”???»?µ???µ??? ° ?±?°???? ?? ???µ?»????????? ‚?????°???????° ???????‚??????? ??° ?·?°??????????? °?‚ ?????‰?°?‚?°, ???????‚?? ?????° 2 ???°???????? ?? ???¶?°???°?». ?“???°???????° 400 ??2 ?? ???????‚?? ?·?° ???°?????????°? ??µ ???° ?????»?°. ???????????? ?? ?»???·??. ?¦?µ???°: 21000 ?•??????',Price ='21000',Locati on='Veliko Tarnovo',Town=' Veliko Tarnovo',smallp ic='d127sm.jpg' ,Pic1='d127a.jp g',Pic2='d127b. jpg',Pic3='d127 c.jpg',Pic4='d1 27d.jpg',Portfo lio='existing', Size='200',Cond ition='for renovation',Plo tsize='400',Roa daccess='good all year around',Distanc e='11 km to Zlataritsa',typ e='House',Elect ricity='yes',Wa ter='yes',garag e='-',bedrooms='3', Kitchen='-',Status='for sale',WC='-' WHERE akey = '120' stmt
error:1064 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 'Condition='for renovation',Plo tsize='400',Roa daccess='good all year around',Dist' at line 1
error:1064 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 'Condition='for renovation',Plo tsize='400',Roa daccess='good all year around',Dist' at line 1
Comment