ezPortal

Started by SMFHacks.com Team, November 02, 2008, 10:10:03 AM

Previous topic - Next topic

mickjav

Just tried Adding The Todays Birthdays Block

Home of Chart Tracker Elite, Apollo & DJ 2020, Coming soon The Librarian.

mickjav

#2081
Got My Artists Banner Working so Rather than Edit Each Script I thought I would create A php Block that Would display the header but not going my way Lol

I am getting error "The database value you're trying to insert does not exist: this_gal"

I've tried loads of thing without luck any help would be appreciated.

    global $smcFunc, $sourcedir;

    require_once($sourcedir . '/artists/artists_module.php');
   
    // Get the Category
    if (!empty($_REQUEST['cat']))
        $cat = (int) $_REQUEST['cat'];
   
    //Get the All Artists
    $dbquery = $smcFunc['db_query']('', '
    SELECT art_id, artist_gallery_id
    FROM {db_prefix}artists
    WHERE artist_gallery_id = {int:this_gal}',
            array(
                'this_gal' => $cat
            ));
 
if ($smcFunc['db_affected_rows']() != 0)
    {
        $row = $smcFunc['db_fetch_assoc']($dbquery)
        echo GetArtistBanner($row['art_id']);       
    }
    $smcFunc['db_free_result']($dbquery);

Home of Chart Tracker Elite, Apollo & DJ 2020, Coming soon The Librarian.

mickjav

Found One Error ($dbquery))

But Still getting The "The database value you're trying to insert does not exist: this_gal"

Home of Chart Tracker Elite, Apollo & DJ 2020, Coming soon The Librarian.

vbgamer45

5.5.1
!Fixed undefined error with Birthdays block SMF 2.1.x
!Fix small option for Calendar block for SMF 2.1.x
Community Suite for SMF - Take your forum to the next level built for SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com -  Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

mickjav

Managed To Sort My BlocK error I keep forgetting to set the $vars = '' lOL

global $smcFunc, $sourcedir;

require_once($sourcedir . '/artists/artists_module.php');

$cat = '';

// Get the Category
if (!empty($_REQUEST['cat']))
$cat = (int) $_REQUEST['cat'];

If ($cat != '')
{

//Get the All Artists
$dbquery = $smcFunc['db_query']('', '
    SELECT art_id, artist_gallery_id
    FROM {db_prefix}artists
WHERE artist_gallery_id =' . $cat);

if ($smcFunc['db_affected_rows']() != 0)
{
$row = $smcFunc['db_fetch_assoc']($dbquery);
        echo GetArtistBanner($row['art_id']);
}
$smcFunc['db_free_result']($dbquery);
}

Took me a while as still trying to figure the Bugging angle  ;D 

Home of Chart Tracker Elite, Apollo & DJ 2020, Coming soon The Librarian.

Advertisement: