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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T12:06:31+00:00 2026-05-22T12:06:31+00:00

I have a database of more than 70000 records and its primary key value

  • 0

I have a database of more than 70000 records and its primary key value started from 1 single digit.

So I want user have to type nm0000001 instead of 1 in url.And in code part I have to discard the rest of the value except 1.

But my problem is i want this type of things having 9 letters in the string and the pattern is like this

1    - nm0000001
9    - nm0000009
10   - nm0000010
2020 - nm0002020

And from the above pattern i want only the digits like 1,9,10,2020 in php.

  • 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-22T12:06:32+00:00Added an answer on May 22, 2026 at 12:06 pm

    Assuming the value is received in the URL as a querystring parameter, that is, passed via $_GET['id'] or some other name than id:

    // Trim the "nm" off the front
    $pk = substr($_GET['id'],2);
    // And parse out an integer value.
    $id = intval($pk);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I want to count the number of records in database from more than two
I have a database containing tables with more than 600 million records and a
I have a large database containing more than five million records, this database has
I am planning to have a database of size more than 12 million records
I have a database that contains more than 100 million records. I am running
I have a database DB and I want to delete records from table MyRecords
I have a database with more than 2 million records and I need to
I have more than 100 million unique strings (VARCHAR(100) UNIQUE in MySQL database). Now
Where I have more than one table in my database for use with (similar,
I have a SQL Server database which has grown to more than 15GB in

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.