CodeCharge Studio
search Register Login  

Web Reports

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

YesSoftware Forums -> CodeCharge Studio -> General/Other

 List Box Display Values Null Based

Print topic Send  topic

Author Message
Susan
Posted: 11/21/2004, 2:22 PM

I have a list box set up in the search grid "s_pending" with ListOfValues 1;Pending;2;Finished

In the grid "tasks" I have {task_finish_date}
I would like the search to display in the grid,
tasks with a NULL {task_finish_date} which would be PENDING.
and tasks which IS NOT NULL{task_finish_date} which would be FINISHED
and no selection would display All tasks.

I was suggested to use:
Switch Table to SQL

SELECT *
FROM `tasks`
WHERE task_finish_date {padding}

{padding} = + Parameter
Variable Name = padding
Parameter = CCGetPadding(CCGetFromGet("s_pending", 1))
Type: Expression



s_pending = the 1;Pending;2;Finished from the Search Listbox

A small Function write in the Common:

function CCGetPadding($padding)
{
if($padding == 1) {
$wherepadding = "IS NULL"; }
elseif($padding == 2) {
$wherepadding = "IS NOT NULL"; }
return $wherepadding;
}



But MySQL said:


You have an error in your SQL syntax near '{padding} {padding} = + Parameter Variable Name = padding Parameter




Anyone know what the correct code would be?

Add new topic Subscribe to topic   


These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit http://support.yessoftware.com.

Web Database

Join thousands of Web developers who build Web applications with minimal coding.
CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


Powered by UltraApps Forum created with CodeCharge Studio
Copyright © 2003-2004 by UltraApps.com  and YesSoftware, Inc.