0

The MySQL database currently lists each word Hebrew word of the old testament with the exception of this one Hebrew word that failed to insert to the database during the database creation (with the possibility of other omissions). The order that the words are so entered into the database are important for that is so how the order of the sentence can be established at the moment. The omission occurred at word 26553, meaning that at 26553 sits word 26554, and at 26554 sits word 26555 etc.. So is there an SQL statement that will INSERT the record and correctly redefine the following AUTONUM field to the correct numbers? And if not then is so there a functionality aka procedure that can be followed to produce the needed result?

I edit the database setting currently through the C-Panel_App[phpMyAdmin}

Under phpMyAdmin 4.3.8 documentation »
Requirements

Web server

Since, phpMyAdmin’s interface is based entirely in your browser, you’ll need a web server (such as Apache, IIS) to install phpMyAdmin’s files into.

PHP

You need PHP 5.3.0 or newer, with session support, the Standard PHP Library (SPL) extension, JSON support, and the mbstring extension.
To support uploading of ZIP files, you need the PHP zip extension.
You need GD2 support in PHP to display inline thumbnails of JPEGs (“image/jpeg: inline”) with their original aspect ratio.
When using the cookie authentication (the default), the mcrypt extension is strongly suggested.
To support upload progress bars, see 2.9 Seeing an upload progress bar.
To support XML and Open Document Spreadsheet importing, you need the libxml extension.
Performance suggestion: install the ctype extension.

See also

1.31 Does phpMyAdmin support PHP 5?, Using authentication modes

Database

phpMyAdmin supports MySQL-compatible databases.

MySQL 5.5 or newer
MariaDB 5.5 or newer
Drizzle

See also

1.17 Which MySQL versions does phpMyAdmin support? Web browser

To access phpMyAdmin you need a web browser with cookies and javascript enabled.


If you need any more information some directions how to get it would be nice thanks. An answer using PHP, MySQL, or a combination of both would be appreciated. Thanks so much. And if changes need to happen to the database Instructions how to make the changes through phpMyAdmin would also be appreciated.

James Z
  • 12,209
  • 10
  • 24
  • 44
Decrypted
  • 117
  • 1
  • 7
  • 2
    This kind of problem is symptomatic of a fundamental flaw in your understanding of RDBMSs. If the value of an autoincremented id matters, you're doing it wrong. – Strawberry Feb 21 '16 at 07:57

1 Answers1

1
  1. First amend the table so that this 'id' column is no longer the PRIMARY KEY (you may need to remove its auto increment behaviour first).

  2. Change the name of the column to something like sequence_no

  3. Update the table so that 1 is added to every sequence_no >= 26553.

4, Add a new autoincrementing PK column called id.

  1. Insert the missing row. Assign its sequence_no as 26553. Its id will be chosen by the autoincrementer.

In your queries, order your result set by sequence_no.

Repeat steps 3 & 5 for any further omissions

Strawberry
  • 33,750
  • 13
  • 40
  • 57