QueryNew()
Creates an empty query (query object).
QueryNew( columnNames=object, columnTypes=object, data=any );
Returns: Query
Examples
testQuery = queryNew( "name , age" , "varchar , numeric" , { name: [ "Susi" , "Urs" ] , age: [ 20 , 24 ] } );
dump(testQuery);
<span class="nv">qry</span><span class="o">=</span> <span class="nf">queryNew</span><span class="p">(</span> <span class="s2">"name , age"</span> <span class="p">,</span> <span class="s2">"varchar , numeric"</span> <span class="p">,</span> <span class="p">[</span> <span class="p">[</span> <span class="s2">"Susi"</span> <span class="p">,</span> <span class="m">20</span> <span class="p">]</span> <span class="p">,</span> <span class="p">[</span> <span class="s2">"Urs"</span><span class="p">,</span> <span class="m">24</span> <span class="p">]</span> <span class="p">]);</span>
<span class="nf">dump</span><span class="p">(</span><span class="nv">qry</span><span class="p">);</span>
<span class="nv">qry</span><span class="o">=</span> <span class="nf">queryNew</span><span class="p">(</span> <span class="s2">"name , age"</span> <span class="p">,</span> <span class="s2">"varchar , numeric"</span> <span class="p">,</span> <span class="p">[</span> <span class="p">{</span> <span class="nv">name</span><span class="p">:</span> <span class="s2">"Susi"</span> <span class="p">,</span> <span class="nv">age</span><span class="p">:</span> <span class="m">20</span> <span class="p">},</span> <span class="p">{</span> <span class="nv">name</span><span class="p">:</span> <span class="s2">"Urs"</span> <span class="p">,</span> <span class="nv">age</span><span class="p">:</span> <span class="m">24</span> <span class="p">}</span> <span class="p">]</span> <span class="p">);</span>
<span class="nf">dump</span><span class="p">(</span><span class="nv">qry</span><span class="p">);</span>
See also
- Queries
- Query
- Search Issue Tracker
- Search Lucee Test Cases (good for further, detailed examples)