close ad
Install the LAtest Updates to Work with CC 2017 and CC 2018
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

I'm at a loss...lol

Thread began 3/21/2010 1:50 pm by akstudio | Last modified 3/24/2010 4:07 pm by akstudio | 1456 views | 5 replies

akstudio

I'm at a loss...lol

Im trying to figure something out, and I'm not even sure what terms would describe it, which makes my google searches fruitless....

I have a master/detail page.

The master page lists out the records, and, obviously, the details page, is the details of those records.

What I needed to do was pull data from 3 tables

videos
tags
products

I went and modified the SELECT, it now looks like:

$query_video_library = "SELECT c.product as product_name, b.name as name, a.product as product, a.product_id as product_id, a.small_thumbnail as small_thumbnail, a.title as title, a.description as description, a.video_length as video_length, a.channel_id as channel_id, a.id as linkid, a.`channel_id`, a.`channel_id` FROM videos a INNER JOIN tags b ON a.channel_id = b.id INNER JOIN products c ON a.product_id = c.id";

This works fine. (maybe a better way to handle it, i dunno)

When the page is rendered, they are all displayed.

However, I now need to add in a dropdown that will sort the records by tags.

What I have ended up creating is this:

if(isset($_POST['channel_sort']) or isset($_POST['product']) or isset($_POST['solution'])){
$newchannel = $_POST['channel_sort'];


$query_video_library = "SELECT c.product as product_name, b.name as name, a.product as product, a.product_id as product_id, a.small_thumbnail as small_thumbnail, a.title as title, a.description as description, a.video_length as video_length, a.channel_id as channel_id, a.id as linkid, a.`channel_id`, a.`channel_id` FROM videos a INNER JOIN tags b ON a.channel_id = b.id INNER JOIN products c ON a.product_id = c.id WHERE a.channel_id = '$newchannel'";
} else {

$query_video_library = "SELECT c.product as product_name, b.name as name, a.product as product, a.product_id as product_id, a.small_thumbnail as small_thumbnail, a.title as title, a.description as description, a.video_length as video_length, a.channel_id as channel_id, a.id as linkid, a.`channel_id`, a.`channel_id` FROM videos a INNER JOIN tags b ON a.channel_id = b.id INNER JOIN products c ON a.product_id = c.id";

}

When someone chooses an item from the drop down.... the SQL changes.

This all still works.... somehow.

PROBLEM:

I cannot add in any pagination for some reason. Dreamweaver tells me "video_library" doesn't exist., when it clearly does. The Dreamweaver bindings panel does not show "video_library" and in my server behaviors it says the repeat region "video_library" doesn't exist when i click on it (has red ! ) - it defaults to "channel_sort"

I fear that I will only end up with more problems with this method.

My logic is telling me I need some sort of .. I guess "if" statement all rolled up into one SQL statement, or something.

I still need to add in another drop down for products ... and possibly another for solutions... AND the pagination.

A big thanks to anyone who can shed light on this mess.

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question

Content

rating

Layout

rating

Ease of use

rating

security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...