Temos pavadinimas: WordPress, Shopify ir PHPFusion programuotojų bendruomenė :: mckenzie Klausimai

Parašė mckenzie· 2008 Gru. 4 18:12:18
#19

Neveikia pas mane kitoks tas downloadsas. Va kaip dariau:
$result = dbquery("INSERT INTO ".$db_prefix."nario_topas (top_order, music_id, user_id, nuo_kada) VALUES ('', '$d_id', '".$userdata['user_id']."', '".time()."')");



Keičiau į:
$result = dbquery("INSERT INTO ".$db_prefix."nario_topas (top_order, music_id, user_id, nuo_kada, user_added) VALUES ('', '$d_id', '".$userdata['user_id']."', '".$userdata['user_id']."', '".time()."')");





Tada po:
         $rows = dbcount("(*)", "downloads", "download_cat='$cat_id'");
         if (!isset($rowstart) || !isNum($rowstart)) $rowstart = 0;
         if ($rows != 0) {
            $result = dbquery("SELECT * FROM ".$db_prefix."downloads WHERE download_cat='$cat_id' ORDER BY download_datestamp DESC LIMIT $rowstart,30");
            //s
            $catdata = dbarray(dbquery("SELECT * FROM ".$db_prefix."download_cats WHERE download_cat_id='$cat_id'"));
            $count = dbresult(dbquery("SELECT count(download_id) FROM ".$db_prefix."downloads WHERE download_cat='$cat_id'"), 0);




Rašau (ir atrodo taip):
         $rows = dbcount("(*)", "downloads", "download_cat='$cat_id'");
         if (!isset($rowstart) || !isNum($rowstart)) $rowstart = 0;
         if ($rows != 0) {
            $result = dbquery("SELECT * FROM ".$db_prefix."downloads WHERE download_cat='$cat_id' ORDER BY download_datestamp DESC LIMIT $rowstart,30");
            //s
            $catdata = dbarray(dbquery("SELECT * FROM ".$db_prefix."download_cats WHERE download_cat_id='$cat_id'"));
            $count = dbresult(dbquery("SELECT count(download_id) FROM ".$db_prefix."downloads WHERE download_cat='$cat_id'"), 0);
$resultx = dbquery("SELECT user_name FROM ".$db_prefix."users WHERE user_id='".$data['user_added']."'");
while ($datax=dbarray($resultx)) {
$autorius = "<a href='".BASEDIR."profile.php?lookup=".$data['user_added']."'>".$datax['user_name']."</a>";
}





Ir pridetiniuos padariau užklausa. What can be wrong? :)

Redagavo mckenzie· 2008 Gru. 4 18:12:27