CodeCharge Studio
search Register Login  

Visual PHP Web Development

Visually Create Internationalized Web Applications, Web Reports, Calendars, and more.
CodeCharge.com

YesSoftware Forums -> CodeCharge Studio -> PHP

 Show only particular items based on WHERE condition

Print topic Send  topic

Author Message
Markie


Posts: 251
Posted: 08/06/2008, 6:30 AM

I thought this was simple, but I'm stuck and hope somebody on this forum can help me.
In my MySQL table (named Mytable), I have made a field named "obsolete", details: varchar (10)

I have made a page, on which I want to show obsolete items. If the "obsolete" field of my MySQL table contains "true", I want to show the item on the obsolete page. On this obsolete page I have made a grid, named mytable. With Visual Query Builder I have added this query to the grid:

SELECT *
FROM mytable
WHERE Obsolete LIKE '%{true}%'

However, it doesn't work. The page shows all items in my database.
What do I do wrong. Details of my query:

field = Obsolete (Text)
condition = contains (like '%...%' )
parameter = true (url)

Markie
_________________
The Netherlands, GMT+1
Tools: CCS 5.1, Windows 7, Navicat, Ultraedit
Local server: XAMPP with Apache, php and MySQL
Webserver: Windows 2008 IIS 7, php and MySQL
View profile  Send private message
wkempees


Posts: 1679
Posted: 08/06/2008, 6:41 AM

field = Obsolete (Text)
condition = equals(= )
parameter = "true" (expression)

if you actualy test for obsolete to contain the string "true"



_________________
Origin: NL, T:GMT+1 (Forumtime +9)
CCS3/4.01.006 PhP, MySQL .Net/InMotion(Vista/XP, XAMPP)

if you liked this info PAYPAL me: http://donate.consultair.eu
View profile  Send private message
Markie


Posts: 251
Posted: 08/06/2008, 7:45 AM

Dank je Walter !

I indeed had to use the quotes ("...") and expression instead of url

_________________
The Netherlands, GMT+1
Tools: CCS 5.1, Windows 7, Navicat, Ultraedit
Local server: XAMPP with Apache, php and MySQL
Webserver: Windows 2008 IIS 7, php and MySQL
View profile  Send private message

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.

MS Access to Web

Convert MS Access to Web.
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.