Some links not working

6 posts by 2 authors in: Forums > CMS Builder
Last Post: November 17, 2009   (RSS)

By Toledoh - November 17, 2009

Hi Guys,

Can you have a look at http://www.haddins.com/wellness/index.php

All is working fine, however the dropdown navigation for "Services" is playing up... a number of the links work, others come up with "no record found"..

ie. http://www.haddins.com/wellness/services.php?Conference-Boost-9 gets an error, whilst
http://www.haddins.com/wellness/services.php?Health-Fairs-Expos-4 works fine.

I know there's a record "9". I was thinking somehow there's a limitation so only the first X records work... or maybe I've just done something stupid...

Can you help?

Cheers,
Tim
Cheers,

Tim (toledoh.com.au)

Re: [Toledoh] Some links not working

By Dave - November 17, 2009

Hi Tim,

Can you attach the viewer file to this thread?

Thanks!
Dave Edis - Senior Developer
interactivetools.com

Re: [Dave] Some links not working

By Toledoh - November 17, 2009

Here you go Dave.

Cheers,
Cheers,

Tim (toledoh.com.au)

Re: [Toledoh] Some links not working

By Dave - November 17, 2009

I think it's loading the banner by number (9 or 4) instead of randomly which I think is what you want. Try removing these lines:

list($c_bannersRecords, $c_bannersMetaData) = getRecords(array(
'tableName' => 'c_banners',
'where' => whereRecordNumberInUrl(1),
'orderBy' => 'RAND()',
'limit' => '1',
));
$c_bannersRecord = @$c_bannersRecords[0]; // get first record

// show error message if no matching record is found
if (!$c_bannersRecord) {
print "Record not found!";
exit;
}


Let me know if that fixes it for you.
Dave Edis - Senior Developer
interactivetools.com

Re: [Toledoh] Some links not working

By Dave - November 17, 2009

Yes, otherwise it may have problems if there's a number in the url.
Dave Edis - Senior Developer
interactivetools.com