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 9247521
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T09:44:56+00:00 2026-06-18T09:44:56+00:00

We have an iPhone app that sends invoice data by each of our employees

  • 0

We have an iPhone app that sends invoice data by each of our employees several times per day. When they are in low cell signal areas tickets can come in as duplicates, however they are assigned a unique ‘job id’ in the mysql database, so they’re viewed as unique. I could exclude the job id and make the rest of the columns DISTINCT, which gives me the filtered rows I’m looking for (since literally every data point is identical except for the job id), however I need the job ID since it’s the primary reference point for each invoice and is what I point to for: approvals, edits, etc.

So my question is, how can I filter out ‘near’ duplicate rows in my query, while still pulling in the job id for each ticket?

The current query is below:

SELECT * FROM jobs, users
WHERE jobs.job_csuper = users.user_id
AND users.user_email = '".$login."'
AND jobs.job_approverid1 = '0'

Thanks for looking into it!

Edit (examples provided):
This is what I meant by ‘near duplicate’

Job_ID - Job_title - Job_user - Job_time - Job_date
2345 - Worked on circuits - John Smith - 1.50 - 2013-01-01
2344 - Worked on circuits - John Smith - 1.50 - 2013-01-01
2343 - Worked on circuits - John Smith - 1.50 - 2013-01-01

So everything is identical except for the Job_ID column.

  • 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-06-18T09:44:58+00:00Added an answer on June 18, 2026 at 9:44 am

    You want a group by:

    SELECT *
    FROM jobs, users
    WHERE jobs.job_csuper = users.user_id
    AND users.user_email = '".$login."'
    AND jobs.job_approverid1 = '0'
    group by <all fields from jobs except jobid>
    

    I think the final query should look something like this:

    select min(Job_ID) as JobId, Job_title, user.name as Job_user, Job_time, Job_date
    FROM jobs join users
         on jobs.job_csuper = users.user_id
    WHERE jusers.user_email = '".$login."' AND jobs.job_approverid1 = '0'
    group by Job_title, user.name, Job_time, Job_date
    

    (This uses ANSI syntax for joins and is explicit about the fields coming back.)

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

Sidebar

Related Questions

I have an app [iphone], that sends to a server some times [using json],
I have an iphone app that sends and retrieves data from a php script.
I have an app where the iPhone sends data to a server and the
I have an iPhone app I'm working on that grabs data off a json-feed
I have an iPhone app that needs to send data (it's a vote) to
I have a client that wants an iPhone app that at some point sends
I have an iPhone app that sends in app email (using MFMailComposeViewController) and SMS
I have a form data from an iphone app that needs to send HTTP
I have an iPhone app that I've built for the app store. Before I
I have an iPhone app that I am writing and it has 2 targets

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.