When you ve specified your criterion, you must click (Sri lanka web server)
When you ve specified your criterion, you must click the Add button to go on. (If you forget this step, the query won t work and you ll drive yourself nuts trying to figure out what s wrong.) When you click Add, your current selections are converted to SQL down at the bottom of the dialog box. The other controls are cleared so you can create additional criteria, if need be. If you don t need to add any more criteria, then click OK to return to the previous wizard page. The SELECT statement you re creating now contains a WHERE clause that looks like this: WHERE ([UserName] = @UserName) That s SQL for get records only for whichever user requested this page. It s important to understand that the WHERE clause you create must refer to columns in the current query. The query shown here wouldn t work in the Items table because there s no UserName column in the Items table. But it works in DetailedUsersItemsView because that view does contain a UserName column. When you test a query that includes a WHERE clause, you ll need to manually type in some plausible data to verify that the SELECT statement works. This means click Next, and then click Test Query. You won t see query results immediately; instead, you see the Parameter Values Editor dialog box shown in Figure 12-14. A parameter is a chunk of information being passed to the SQL statement. For example, we can feed the WHERE clause the parameter Bob. In return, the SQL statement spits back only records that have Bob in the UserName column. Figure 12-13: Retrieve records for the current user only. Chapter 12: Using Data in Web Pages 271
We recommend cheap and reliable webhost to host and run your web applications: Coldfusion Web Hosting services.