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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T03:55:27+00:00 2026-06-07T03:55:27+00:00

I have column with the following information: Author varchar(255) utf8_general_ci the programmer who designed

  • 0

I have column with the following information:

Author  varchar(255)    utf8_general_ci

the programmer who designed the website before me used this column to store two things!
first, the name of the author in English, then his/her name in Arabic !
so, all the data in that column have the same structure :تووياما أيما (Tooyama Ema)
between the parenthesis is the name in English. outside the parentheses the name in Arabic.
Is there any way to take the English name and put it in a new column. plus remove the parenthesis? I can use both PHP and SQL, so please can you give me a solution with those two languages?
I want the result to look like this :

Author : تووياما أيما
Author in English : Tooyama Ema

I am talking about many rows with the same structure. and I want to change the structure in the database.

  • 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-07T03:55:28+00:00Added an answer on June 7, 2026 at 3:55 am

    I’d recommend an db-driven solution, should take less time coding and running than using PHP.

    Not sure on the table name, but here is the meat of what you need, change to your liking:

    (assuming rough table definition of)

    CREATE TABLE Test (
      id int(11) not null auto_increment,
      Author varchar(255),
      primary key (id)
    )
    

    An alter table for the new columns:

    ALTER TABLE Test ADD COLUMN `arabic_name` varchar(255) AFTER `Author`;
    ALTER TABLE Test ADD COLUMN `english_name` varchar(255) AFTER `arabic_name`;
    

    A simple update statement to migrate the data (not the prettiest, but works just fine):

     UPDATE Test
     SET
     arabic_name = SUBSTR(TRIM(Author), 1, LOCATE(' ', TRIM(Author)) - 1),
     english_name = SUBSTR(TRIM(Author), LOCATE('(', TRIM(Author)) + 1, LOCATE(')', TRIM(Author)) -  LOCATE('(', TRIM(Author)) - 1);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have to store the following information into a database, to be used by
I have the following information for the same individual in column A of a
I have the following column specified in a database: decimal(5,2) How does one interpret
In Cassandra, I have the following Column Family: <ColumnFamily CompareWith=TimeUUIDType Name=Posts/> I'm trying to
I have a column that has the following data: PersonId=315618 LetterId=43 MailingGroupId=1 EntityId=551723 trackedObjectId=9538
i have a table that has following column Type -------- type 1 type 2
I know that using the following codes will make each column have unique values,
I have a three column workbook with the following data: Col A: Names Col
I have a computed column created with the following line: alter table tbPedidos add
I have a property column which can have a subset of the following values

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.