fmbma
|
| Posted: 11/09/2002, 7:43 PM |
|
I've gotten the PHP gallery example to upload files, but it does not save the name into the location field in the items table. Here is the SQL code in the example:
$uSQL = "update items set location='$myfile_name' where item_id=".get_param("item_id");
It looks like the location is expressed as a literal here. should be
$uSQL = "update items set location='" . $myfile_name . "' where item_id=".get_param("item_id");
However, no matter what I do with the SQL statement, it won't save. There are no errors. I'm running on windows with a dsn to a jet database. all the other database functions in Gallery work. does anyone have a fix for this?
|
|
|
 |
Alex Alexapolsky
|
| Posted: 11/11/2002, 2:30 AM |
|
Besides assignment , the sql should be executed with
$db->query($uSQL);
|
|
|
 |
fmbma
|
| Posted: 11/11/2002, 5:10 AM |
|
I do,
here is the code, with the original sql assignment commented.
//Update the database table for the new record
//$uSQL = "update items set location='$myfile_name' where item_id=".get_param("item_id");
$uSQL = "update items set location= '" . $myfile_name . "' where item_id= ".get_param("item_id");
$db->query($uSQL);
again, no errors, but no file update.
|
|
|
 |
copernicus
|
| Posted: 11/11/2002, 7:58 AM |
|
hi,
i think in the PHP gallery example, u must try to switch the form type from "menu" to "grid", and select the table "items", so it will work correctly...
best regards
|
|
|
 |
copernicus
|
| Posted: 11/11/2002, 8:32 AM |
|
(in addition to my previouz one)
i mean AdminRecord page...
Bezt Regardz...
|
|
|
 |
fmbma
|
| Posted: 11/11/2002, 9:35 AM |
|
I believe that fixed it!!!!
thanks
Fred
|
|
|
 |
|