Hi...All!,
I am new to cake php,I am suing postgreSql i need to update some
fields in my database. In my controller my code like this....here i
need convert these update command to cake, Please anyone can help me
out how to convert this in to cake.
function fun() {
/**********************************
( 1 )**********************************************/
pg_exec($conn,"UPDATE tblcdlog SET strerrordesc = 'The CD could not be
mounted. Make sure it is a valid $COMPANY_NAME Data CD.' WHERE
lngcdlog = $lngCDLog");
/*************** Here some content related to our script
*****************/
$fError = fopen("/tmp/errorlog", "a+");
fwrite($fError, "ERROR : The CD may not be loaded in this $DEST_NAME...
\n\n");
fclose($fError);
/
************************************(2)********************************************/
pg_exec($conn,"UPDATE tblcdlog SET strerrordesc = 'There is not
sufficient space on your hard drive.' WHERE lngcdlog = $lngCDLog");
/*************** Here some content related to our script
*****************/
$fError = fopen("/tmp/errorlog", "a+");
fwrite($fError, "ERROR : The CD may not be loaded in this $DEST_NAME...
\n\n");
fclose($fError);
/
**************************************(3)******************************************/
pg_exec($conn,"UPDATE tblcdlog SET strerrordesc = 'There is not
sufficient space on your hard drive.' WHERE lngcdlog = $lngCDLog");
/*************** Here some content related to our script
*****************/
$fError = fopen("/tmp/errorlog", "a+");
fwrite($fError, "ERROR : The CD may not be loaded in this $DEST_NAME...
\n\n");
fclose($fError);
/
**************************************(4)******************************************/
pg_exec($conn,"UPDATE tblcdlog SET strerrordesc = 'The CD is not a
valid $COMPANY_NAME data CD.' WHERE lngcdlog = $lngCDLog");
/*************** Here some content related to our script
*****************/
$fError = fopen("/tmp/errorlog", "a+");
fwrite($fError, "ERROR : The CD may not be loaded in this $DEST_NAME...
\n\n");
fclose($fError);
/
**************************************(5)******************************************/
pg_exec($conn,"UPDATE tblcdlog SET strerrordesc = 'The CD may not be
loaded in this $DEST_NAME.' WHERE lngcdlog = $lngCDLog");
/*************** Here some content related to our script
*****************/
$fError = fopen("/tmp/errorlog", "a+");
fwrite($fError, "ERROR : The CD may not be loaded in this $DEST_NAME...
\n\n");
fclose($fError);
/
**************************************(6)******************************************/
pg_exec($conn,"UPDATE tblcdlog SET strcdno = '$identifiercode' WHERE
lngcdlog = $lngCDLog");
/*************** Here some content related to our script
*****************/
$fError = fopen("/tmp/errorlog", "a+");
fwrite($fError, "ERROR : The CD may not be loaded in this $DEST_NAME...
\n\n");
fclose($fError);
/
**************************************(7)******************************************/
pg_exec($conn,"UPDATE tblcdlog SET strerrordesc = 'Invalid
$COMPANY_NAME CD-Rom ID Code.' WHERE lngcdlog = $lngCDLog");
/*************** Here some content related to our script
*****************/
$fError = fopen("/tmp/errorlog", "a+");
fwrite($fError, "ERROR : The CD may not be loaded in this $DEST_NAME...
\n\n");
fclose($fError);
/
**************************************(8)******************************************/
pg_exec($conn,"UPDATE tblcdlog SET strerrordesc = 'The CD has already
been loaded, and may not be loaded again.' WHERE lngcdlog =
$lngCDLog");
/*************** Here some content related to our script
*****************/
$fError = fopen("/tmp/errorlog", "a+");
fwrite($fError, "ERROR : The CD may not be loaded in this $DEST_NAME...
\n\n");
fclose($fError);
/
**************************************(9)******************************************/
pg_exec($conn,"UPDATE tblcdlog SET blnsuccess = '1', strversion =
'$strVersion', strupdateno = '$strUpdateNo' WHERE lngcdlog =
$lngCDLog");
}
Please help me out ....Thanks in Advance..!
Check out the new CakePHP Questions site http://cakeqs.org and help others with
their CakePHP related questions.
You received this message because you are subscribed to the Google Groups
"CakePHP" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected] For more options, visit this group at
http://groups.google.com/group/cake-php?hl=en