<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[How can i store data of database&#x27;s different categories]]></title><description><![CDATA[<p dir="auto">I want to export data into CSV format, i have this table it has column for customer id, product category id and price of product that customer bought.<br />
<img src="https://ddgobkiprc33d.cloudfront.net/7a2f0687-e8de-45ff-9316-fd8a5f9efd23.png" alt="edfb274f-9955-4b4d-a21b-9c270592f9b6-image.png" class=" img-fluid img-markdown" /><br />
I want to export below table to CSV for all products. First row is customer id and column under every customer id is prices of products that customer bought.</p>
<p dir="auto">The question is how can i store data of prices by user and product. I tryed to use queries and arrays, but i don't know how many there will be values.</p>
<p dir="auto"><img src="https://ddgobkiprc33d.cloudfront.net/b9869df3-cdc2-42bb-b62d-b15035170f0b.png" alt="0a493374-6356-44a7-a630-aef8f1b52b6b-image.png" class=" img-fluid img-markdown" /></p>
<p dir="auto">To export to CSV i store all data in QString value with ';' for next column and \n for next row and then transimt QString value.</p>
]]></description><link>https://forum.qt.io/topic/141921/how-can-i-store-data-of-database-s-different-categories</link><generator>RSS for Node</generator><lastBuildDate>Sun, 19 Apr 2026 14:33:08 GMT</lastBuildDate><atom:link href="https://forum.qt.io/topic/141921.rss" rel="self" type="application/rss+xml"/><pubDate>Tue, 03 Jan 2023 20:42:35 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to How can i store data of database&#x27;s different categories on Sun, 08 Jan 2023 11:58:20 GMT]]></title><description><![CDATA[<p dir="auto">Solved by creating QTableWidget. I transmited data from database in QTableWidget one query in a column and then row by row added data from QTableWidget to QString value to export it later to CSV.</p>
]]></description><link>https://forum.qt.io/post/742971</link><guid isPermaLink="true">https://forum.qt.io/post/742971</guid><dc:creator><![CDATA[Kuji]]></dc:creator><pubDate>Sun, 08 Jan 2023 11:58:20 GMT</pubDate></item><item><title><![CDATA[Reply to How can i store data of database&#x27;s different categories on Wed, 04 Jan 2023 19:52:58 GMT]]></title><description><![CDATA[<p dir="auto">One issue with your CSV, you are losing the information about which product belongs to which prize unless you also state that each row corresponds to a product ID.</p>
]]></description><link>https://forum.qt.io/post/742548</link><guid isPermaLink="true">https://forum.qt.io/post/742548</guid><dc:creator><![CDATA[SGaist]]></dc:creator><pubDate>Wed, 04 Jan 2023 19:52:58 GMT</pubDate></item><item><title><![CDATA[Reply to How can i store data of database&#x27;s different categories on Wed, 04 Jan 2023 10:28:16 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/chrisw67">@<bdi>ChrisW67</bdi></a> Yes this is what i want.</p>
]]></description><link>https://forum.qt.io/post/742444</link><guid isPermaLink="true">https://forum.qt.io/post/742444</guid><dc:creator><![CDATA[Kuji]]></dc:creator><pubDate>Wed, 04 Jan 2023 10:28:16 GMT</pubDate></item><item><title><![CDATA[Reply to How can i store data of database&#x27;s different categories on Wed, 04 Jan 2023 06:21:07 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/kuji">@<bdi>Kuji</bdi></a> Let me see if I have this straight.  You want to take the table of data you show and produce this table with an unbounded number of columns (one per customer), a header row containing the customer number for each column,  and an unbounded number of rows (as many rows as the maximum number of orders made by any customer).</p>
<pre><code>0       1       2
1999    2499    1399
1349    null    null
</code></pre>
]]></description><link>https://forum.qt.io/post/742407</link><guid isPermaLink="true">https://forum.qt.io/post/742407</guid><dc:creator><![CDATA[ChrisW67]]></dc:creator><pubDate>Wed, 04 Jan 2023 06:21:07 GMT</pubDate></item><item><title><![CDATA[Reply to How can i store data of database&#x27;s different categories on Tue, 03 Jan 2023 21:10:03 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/sgaist">@<bdi>SGaist</bdi></a> How can create query if there can be any amount of customers and products? The problem is i can't just take all prices, because they have different categories.</p>
<p dir="auto">Looks like query should store prices by queue from 0 to last customer, and after last customer's price again 0 to last customer, but i can't figure out how to do this.</p>
]]></description><link>https://forum.qt.io/post/742369</link><guid isPermaLink="true">https://forum.qt.io/post/742369</guid><dc:creator><![CDATA[Kuji]]></dc:creator><pubDate>Tue, 03 Jan 2023 21:10:03 GMT</pubDate></item><item><title><![CDATA[Reply to How can i store data of database&#x27;s different categories on Tue, 03 Jan 2023 20:46:01 GMT]]></title><description><![CDATA[<p dir="auto">Hi,</p>
<p dir="auto">Why do you need to know the exact number of rows ?</p>
<p dir="auto">Just loop over the result of your query and add one line for each row the query returned.</p>
]]></description><link>https://forum.qt.io/post/742368</link><guid isPermaLink="true">https://forum.qt.io/post/742368</guid><dc:creator><![CDATA[SGaist]]></dc:creator><pubDate>Tue, 03 Jan 2023 20:46:01 GMT</pubDate></item></channel></rss>