Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 4267866
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 21, 20262026-05-21T06:57:27+00:00 2026-05-21T06:57:27+00:00

I am using an ExtJS 3.0 grid and generate data from PHP using MySQL.

  • 0

I am using an ExtJS 3.0 grid and generate data from PHP using MySQL. I have setup my idProperty of the grid on the id column. The problem is that I have 2 tables for incoming invoices and one for outgoing invoices with same columns. I want to make a UNION ALL on these 2 tables and show the result into the ExtJS grid. The problem is that there are some duplicate id’s coming out from these tables that causes the ExtJS grid to skip them rows. I know I can do simple UNION to skip duplicates but I need every row in the grid, even if they have the same id. There are actually no distinct data that I can relate to.

Any ideas ? Thanks.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-21T06:57:28+00:00Added an answer on May 21, 2026 at 6:57 am

    Why not add some prefix to the id-column when SELECTing the data:

    (SELECT CONCAT('in-', id) AS id, ... FROM in_table)
    UNION ALL
    (SELECT CONCAT('out-', id) AS id, ... FROM out_table)
    

    You’ll have to make sure that the field-definition for the id-field in your reader configuration has the correct type (auto or string in this case).

    If you need the real id afterwards, change the query to select the real id as well:

    (SELECT CONCAT('in-', id) AS gid, id, 'in' AS type ... FROM in_table)
    UNION ALL
    (SELECT CONCAT('out-', id) AS gid, id, 'out' AS type, ... FROM out_table)
    

    Your idProperty will be gid now.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a problem with a Ext.Grid.EditorGridPanel, I am currently using ExtJS 2.3.0, that
I am working on my first project using ExtJS. I have a Data Grid
I've setup a ExtJS Grid, while using the PagingToolbar (with PagingMemoryProxy on an ArrayStore).
I'm trying out ExtJS Pivot Grid. I'm using the examples pretty much as-is from
Using TortoiseSVN against VisualSVN I delete a source file that I should not have
I am using checkboxselectionmodel in ExtJS grid? when i clicked on the row the
I'm trying to create a dynamic grid using ExtJS. The grid is built and
I have an ExtJS grid like so: var grid = new Ext.grid.GridPanel({ ... });
This is in ASP.NET. We are using a ExtJS frontend, and have our own
I've started using the Sencha Touch / ExtJS JavaScript framework and have am noticing

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.