1
First of all i hope i posted in the right category.
I wanted to migrate my file database from my previous CMS to Xoops.
So, i made a small script to write directly in the xoops_mydownloads_mydownloads database and into the xoops_mydownloads_text database. My problem is: when i click on the link inserted, it doesnt work because XOOPS modify the url after i click on it
here is my insert query
$InsertQuery=
"insert into xoops_mydownloads_downloads "
. "(cid,title,url,size,logourl,submitter,status,date,homepage,version,platform) "
. "values (2,"
. "\"" . $title
. " \", \"" . $DownloadBaseUrl .$file . "\","
. filesize($file)
. ",\"". $ShotBaseUrl . $logourl
. "\",1,1,1088797669,\"\",\"\",\"\")";
and here is my insertcomment query ->
$GetMaxLidQuery=
"select MAX(lid) as truc from xoops_mydownloads_downloads";
$result = mysql_db_query($dbname, $GetMaxLidQuery) or die("Query failed with error message: \"" . mysql_error () . '"'. " ". $GetMaxLidQuery);
$MaxLid = mysql_result ($result,0,0);
$InsertDescriptionQuery= "insert into xoops_mydownloads_text (lid,description) values (". $MaxLid . ",\"". $FileDescription ."\")";
cid must be 2 because all files are in cat 2, i put a fake date (which is a real one) and status is "1" (i dont know what status is).
I have very low experience with Xoops/PHP and mySQL so maybe im missing something.
Thx in advance.