Hi all,
I am currently develeping a module like the File Upload, accept i have developed all the scripts, i want one of the tabs in the admin section to allow admins to upload files to a directory but at the same time insert data they fill in, into a mysql table, the mysql INSERT side of thing does not seem to be working tho?
Basicly:
Form Variables -> Php Handler -> Database
Thanks
Mysql Module
Re: Mysql Module
I don't see any problem, many modules do it: Cataloger, Album, ....Aaron_H wrote: Form Variables -> Php Handler -> Database
Look in these code
Alby
Re: Mysql Module
Hi,
I have tried the script from the news system, cutting out the mysql insert, no look though,
any more help greatly appreciated, thanks.
I have tried the script from the news system, cutting out the mysql insert, no look though,
any more help greatly appreciated, thanks.
Re: Mysql Module
In general you put many die statement and go for debug or if you have sql problem only check in sql tool (ex: phpmyadmin your query)Aaron_H wrote: I have tried the script from the news system, cutting out the mysql insert, no look though,
Alby
Re: Mysql Module
Thanks for the advice,
I am not the best programmer, i havent been doing it at a advacned level realy,
Is it:
$query = 'INSERT INTO '.cms_db_prefix().'module_homework (class, type) VALUES ('.$img.','.$img.')';
$db->Execute($query);
its probaly rong so help would be nice.
Thanks
I am not the best programmer, i havent been doing it at a advacned level realy,
Is it:
$query = 'INSERT INTO '.cms_db_prefix().'module_homework (class, type) VALUES ('.$img.','.$img.')';
$db->Execute($query);
its probaly rong so help would be nice.
Thanks
Re: Mysql Module
No,Aaron_H wrote: $query = 'INSERT INTO '.cms_db_prefix().'module_homework (class, type) VALUES ('.$img.','.$img.')';
$query = "INSERT INTO ".cms_db_prefix()."module_homework (class, type) VALUES ('$img','$img')";
Alby
Re: Mysql Module
Alby thanks alot for your help,
i have had it working now, however some new help is needed, one one of the tabs i want a file manager, so they can view the homework files they uploaded and manage them, now is it possible to copy part of the file manager script into new files in my homework module, if not how would i got about doing the file manager.
THankss
i have had it working now, however some new help is needed, one one of the tabs i want a file manager, so they can view the homework files they uploaded and manage them, now is it possible to copy part of the file manager script into new files in my homework module, if not how would i got about doing the file manager.
THankss