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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T14:51:48+00:00 2026-06-12T14:51:48+00:00

Basically, I have a PHP class for generic SQL statements: object.table(‘table_name’) fills an array

  • 0

Basically, I have a PHP class for generic SQL statements:

  1. object.table('table_name') fills an array with the column names for 'table_name' pulled out of the table_schema

  2. object.insert(data_array) runs an insert statement into 'table_name' using the column array and the data_array

  3. object.select('where') returns everything in 'table_name' using a where statement input or nothing at all

I did this because i’m lazy and I wanted to make my code prettier. However, the schema lookup returns the ID columns from my tables, which is fine because sometimes I need it returned with object.select(). However, it makes object.insert() kinda difficult.

Is there some SQL functionality I don’t know about that allows you to insert into an auto incrememented column accurately or is there a more simple solution right in front of my eyes and I’m just being a complete moron.

  • 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-12T14:51:49+00:00Added an answer on June 12, 2026 at 2:51 pm

    Auto incremented columns cannot be inserted into. You can perform your insert (bypassing the auto-incremented field) and just accept the automatically-generated id…

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

Sidebar

Related Questions

Basically I have a PHP class that that I want to test from the
Basically I have two ways for writing something First: <?php echo link_to( static_image_tag( $object->getImageWebPath(),
Basically, I have the php class myclass located in root/lib/php/ and I want the
So basically I have a PHP script that takes all the images from the
I have php generating html and I want to create layers. Basically I want
Basically I have a single page on my site that I want any php
Basically for a Facebook tab I have a PHP app and want Heroku to
I am new to OO php so this may seem basic.. Basically I have
I have a very large php maintenance script (basically it recreates thumbnails for an
Basically, we have an ASP website right now that I'm converting to PHP. We're

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.