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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T19:55:48+00:00 2026-06-14T19:55:48+00:00

I try to filter my column name when SELECT statement and my query like

  • 0

I try to filter my column name when SELECT statement and my query like below :

$query = "select p.id, p.name from `person` p";

Column ‘name’ data something like below :

Angelina Jolie | Brad Pitt | David Beckham ….

Filter :

When select column name (p.name) i just want select ‘name’ string then remove all string after space. Mean when i select the column i just select name Angelina, Brad, David …

*i know we can do this using implode but i want filter inside query line .

  • 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-14T19:55:49+00:00Added an answer on June 14, 2026 at 7:55 pm

    Try this::

    select substring_index(p.name,' ',1) as name, p.id from person p
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I would like to try some image filter features on iPhone like instagram does.
if I write something like class Chip(models.Model): name = models.CharField(max_length=16) shortname = models.CharField(primary_key=True, unique=True,
I try developing two filter which order a list of groupforumtopics by the amount
I started with https://developers.google.com/maps/articles/phpsqlajax_v3 and am using https://developers.google.com/maps/articles/phpsqlsearch_v3 to try to dynamically filter the
I'm doing a filter form in symfony2 and I try to preselect some filds.
I am trying to develop a DirectShow filter with internet access. When I try
try: html = urlopen('http://glbse.com/api/asset/' + asset.name) except: print 'error while updating the price of
I am using the jQuery DataTables plugin. I'd like to create a custom filter
I'm using jqGrid's filterToolbar method to let users quick search/filter the grid data. I'm
Below I provide my database schema, the database data currently inserted (which is only

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.