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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T00:26:18+00:00 2026-06-10T00:26:18+00:00

The Scenario I have an iOS app where I am POSTing data to a

  • 0

The Scenario

I have an iOS app where I am POSTing data to a web service. Each time, the POST data has a different amount of variables, and is meant to be sent to a specific table in a database, which has that same amount of variables. I have 37 tables, and they range in size from 3 to 27 columns (and the POST statements range in size from 3 to 27 variables).

The Question

I was going to use prepared statements, until I found that you can not change the table name (or row name) in prepared statements. So is there anyway I can avoid using 37 if/else statements? Or will that be the only way to direct the data to the appropriate table?

  • 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-10T00:26:19+00:00Added an answer on June 10, 2026 at 12:26 am

    Identifying your table by the number of columns is a very bad idea, what if you have 2 tables with the same number of columns?

    My suggestion is to add a flag on your URL when posting to your server ex:

    http://www.example.com/?type=settings // for settings table

    http://www.example.com/?type=user // for users table

    and so on. of course you will not use the exact table name in the url that will be a security breach.

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

Sidebar

Related Questions

SCENARIO I have to access a web service with a .NET client. The service
Scenario I have an web application which needs some calculations and processing on data.
Scenario: I have an outline where I have links for my menu. Each link
I'm developing a first iPhone app for iOS 4.x/5.0 and have some confusions on
Scenario: I have a Question which has 2 radio buttons & two subforms: subformA
My scenario I wrote an iOS app for a client. The project is almost
I'm building an iOS app, which provides a service which our website already provides.
I have an iOS app which is using ASIHTTPRequest to talk to a REST
Suppose you have an iOS app with a UINavigationController with three UIViewControllers pushed onto
So my intention is to have a login in my iOS app that allows

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.