karthik
|
Posted: 01/24/2002, 9:36 PM |
|
I downloaded the cc image gallery application, and generated the files in PHP 4 with templates/ MySQL. When I try to add a new image by attaching, I get the following error.
Database error: Invalid SQL: update items set location='8.jpg' where item_id= MySQL Error: 1064 (You have an error in your SQL syntax near '= Session halted.
FYI: I done the database connectivity perfectly. I dont think there is any problem in database, since other programs like registration works fine.
|
|
|
Alex Alexapolsky
|
Posted: 01/25/2002, 4:21 AM |
|
If you swithc to pure PHP this will work.
In template version parameter from image record form should be not passed from
form but saved to session and used later on in the update statement
|
|
|
CodeCharge Support
|
Posted: 01/25/2002, 4:21 AM |
|
Hello,
PHP Upload example was created for PHP pattern not for PHP+Templates. To make it work for PHP+Templates some modifications are required.
Go to AdminRecord page/AdminRecord form/Properties/Header&Footer tab/Footer section and replace the existing code with the following one:
<FORM ENCTYPE="multipart/form-data" ACTION="UploadResult.php?item_id={value}" METHOD=POST>
Or attach file: <INPUT NAME="myfile" TYPE="file">
<INPUT TYPE="submit" VALUE="Attach File">
</FORM>
And create BeforeShow event for AdminRecord form:
$tpl->set_var("value", get_param("item_id"));
|
|
|
RuKl@Neckarstadt.net
|
Posted: 01/25/2002, 7:52 AM |
|
|
|
|
Nicole
|
Posted: 01/26/2002, 1:41 AM |
|
You can find image gallery example at: http://www.gotocode.com/art.asp?art_id=85&
|
|
|
|