Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Query on free text field

EDIT:
Actually, I run MSSQL query, let say the result is:

ID  pagename
1   1
2   01
3   01, 15

Then, I run another command URL and got the result as xml data, let say the result (in simple form) is:

4   01, 01 Aaa, 15
5   02
6   03
7   100
8   101
9   115

Using coldfusion, I can merge both data into one "temporary table". So, actually, I am using a QoQ and not a database query
END EDIT

I have a table like this

ID  pagename
1   1
2   01
3   01, 15
4   01, 01 Aaa, 15
5   02
6   03
7   100
8   101
9   115

Is it possible if I want to show pagename = 1 the result is

ID  pagename
1   1
2   01
3   01, 15
4   01, 01 Aaa, 15
like image 713
Nurkartiko Avatar asked Jan 01 '26 04:01

Nurkartiko


1 Answers

I think that you will have better luck with programming code than query of queries. My approach would resemble this:

<cfset NewQuery = QueryNew("id,pagename","integer,varchar")>
<cfloop query = "ExistingQuery">
  <cfif ListFirst(pagename) EQ 1>
    code to add row and set cell values for NewQuery
  </cfif>
</cfloop>

Note to those reading on the sql page, this is an earlier comment: "@MahmoudGamal sorry, I'm using Coldfusion function QueryNew to create temporary table"

In other words, it's not a database query.

like image 141
Dan Bracuk Avatar answered Jan 02 '26 18:01

Dan Bracuk



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!