close ad
WARNING: Do Not Install the DREAMWEAVER CC 2017 or 2018 Update »
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

Dynamic filter does not work

Thread began 5/17/2010 5:01 am by llastein374316 | Last modified 5/26/2010 8:03 pm by Eric Mittman | 1367 views | 7 replies |

llastein374316

Dynamic filter does not work

The filter in the data selection does not work, no matter what kind of filter i choose.

<?php
$WADWCs_bygd_WADWCaldursbyti_bygd = "0";
if (isset($_SESSION['s_bygd'])) {
$WADWCs_bygd_WADWCaldursbyti_bygd = $_SESSION['s_bygd'];
}
mysql_select_db($database_manntal, $manntal);
$query_WADWCaldursbyti_bygd = sprintf("SELECT aldur AS XLABEL, m_tal AS YVALUE FROM aldursbyti_bygd WHERE ", GetSQLValueString($WADWCs_bygd_WADWCaldursbyti_bygd, "text"));
$WADWCaldursbyti_bygd = mysql_query($query_WADWCaldursbyti_bygd, $manntal) or die(mysql_error());
$row_WADWCaldursbyti_bygd = mysql_fetch_assoc($WADWCaldursbyti_bygd);
$totalRows_WADWCaldursbyti_bygd = mysql_num_rows($WADWCaldursbyti_bygd);
?>

Sign in to reply to this post

Eric Mittman

What is the result that you are getting versus the expected result from this? You can check on the query that is being executed by adding in a die statement like this:

php:
<?php

$WADWCs_bygd_WADWCaldursbyti_bygd 
"0";
if (isset(
$_SESSION['s_bygd'])) {
$WADWCs_bygd_WADWCaldursbyti_bygd $_SESSION['s_bygd'];
}
mysql_select_db($database_manntal$manntal);
$query_WADWCaldursbyti_bygd sprintf("SELECT aldur AS XLABEL, m_tal AS YVALUE FROM aldursbyti_bygd WHERE "GetSQLValueString($WADWCs_bygd_WADWCaldursbyti_byg d"text"));
die(
$query_WADWCaldursbyti_bygd);



Please post back with this so we can determine what the query is that is being executed.

Sign in to reply to this post

llastein374316

The Graph does not display

Thank you for the reply.
The graph does not display when using a session variable, but work perfectly without.

Sign in to reply to this post

Eric Mittman

What does one of the queries using the session variable look like compared to the query that does not use the session variable? If we can compare the queries the problem with using the session variable might be more obvious.

Also, what is the result that you get when you try to view this graph that uses the session variable? Do you see an empty chart, or does the page load with no chart at all?

Sign in to reply to this post

llastein374316

character session variable

Now I have tested the query and found that using a session variable which is a number the graph displays perfectly, but when using a text session variable the data does not show in the graph.

Here is the query with the number session variable which is working perfectly:

<?php
$WADWCs_bygd_WADWCaldursbyti_bygd = "-1";
if (isset($_SESSION['s_bygd'])) {
$WADWCs_bygd_WADWCaldursbyti_bygd = $_SESSION['s_bygd'];
}
mysql_select_db($database_manntal, $manntal);
$query_WADWCaldursbyti_bygd = sprintf("SELECT aldur AS XLABEL, m_tal AS YVALUE FROM aldursbyti_bygd WHERE aldur = %s", GetSQLValueString($WADWCs_bygd_WADWCaldursbyti_bygd, "int"));
$WADWCaldursbyti_bygd = mysql_query($query_WADWCaldursbyti_bygd, $manntal) or die(mysql_error());
$row_WADWCaldursbyti_bygd = mysql_fetch_assoc($WADWCaldursbyti_bygd);
$totalRows_WADWCaldursbyti_bygd = mysql_num_rows($WADWCaldursbyti_bygd);
?>

Do you have any suggestion what to do when using a text session variable?

Sincerely Lena

Sign in to reply to this post

Eric Mittman

Can you post back with the output from a working query using a session variable with a number value and also the output from the query using the session variable with a text value. I would like to see the actual query that is ok versus the one that is not ok.

You can get these queries to print to the screen using the die statement in message #2. Normally when you are setting up the data to be filtered you will need to enter the data type. If you have a text type of value and use a number you can get an error, and the same goes for the other way around. This is what it sounds like you are experiencing. Looking directly at the queries is a good way to see what the difference is.

Sign in to reply to this post

llastein374316

Now it is working

It seems that using the wizart the $WADWCs_bygd_WADWCaldursbyti_bygd is set to "0". I changed it manually to "null" and now it seems to work. I will try to test some other session variables to see if everything is working allright but this session variable seems to work now.
Thank you very much again.

Sincerely Lena

<?php
$WADWCs_bygd_WADWCaldursbyti_bygd = "null";
if (isset($_SESSION['s_bygd'])) {
$WADWCs_bygd_WADWCaldursbyti_bygd = $_SESSION['s_bygd'];
}
mysql_select_db($database_manntal, $manntal);
$query_WADWCaldursbyti_bygd = sprintf("SELECT aldur AS XLABEL, m_tal AS YVALUE FROM aldursbyti_bygd WHERE bygd = %s", GetSQLValueString($WADWCs_bygd_WADWCaldursbyti_bygd, "text"));
$WADWCaldursbyti_bygd = mysql_query($query_WADWCaldursbyti_bygd, $manntal) or die(mysql_error());
$row_WADWCaldursbyti_bygd = mysql_fetch_assoc($WADWCaldursbyti_bygd);
$totalRows_WADWCaldursbyti_bygd = mysql_num_rows($WADWCaldursbyti_bygd);
?>

Sign in to reply to this post

Eric Mittman

Ok, glad that it is working.

Sign in to reply to this post

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...