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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T23:46:26+00:00 2026-06-07T23:46:26+00:00

I have this Select: SELECT pts_name FROM products_tecspecs WHERE pts_id IN ( 5275, 21,

  • 0

I have this Select:

SELECT pts_name
FROM   products_tecspecs
WHERE  pts_id IN ( 5275, 21, 5276, 5277,
                   5278, 49, 5279 )
ORDER  BY FIELD (pts_id, 5275, 21, 5276, 5277, 5278, 49, 5279) 

I am trying to get the result and order it the way I want. I found this answer but got this error: #1305 – FUNCTION database_name.FIELD does not exist

I am trying to get specifics results with IN (that’s working), but sorting the way I want.

Help you be apreciated.

  • 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-07T23:46:28+00:00Added an answer on June 7, 2026 at 11:46 pm

    Remove the space between the function and the parenthesis: FIELD (
    MySQL parser does not like spaces there. Use:

    FIELD(pts_id, ...)
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have this query (simplified): SELECT score FROM tbl WHERE id = xx ORDER
i have this SELECT COUNT(1) cnt, a.auther_id FROM `posts` a LEFT JOIN users u
We have this statement: (SELECT res_bev.bev_id, property_value.name AS priority FROM res_bev, bev_property, property_value WHERE
I have this: SELECT Product.ProductID, Product.Name, Product.GroupID, Product.GradeID, AVG(tblReview.Grade) AS Grade FROM Product left
I have this select sql query: $sql = SELECT `smth`,`smths`,`smthss` FROM sometbl WHERE `smt`='$smt'
I have this query: 1) select C.One ,C.Two ,C.Three ,C.Four from mytable C where
I have this Query: SELECT p.ProductName, dt.MaxTimeStamp, p.Responsible FROM Product p LEFT JOIN (SELECT
I have this select $this->db->select('modulo_regra.regra_descricao'); $this->db->from('modulo_regra'); $this->db->where('modulo_regra.modulo_regra_id', id); $query = $this->db->get(); that return to
I have this query: SELECT DISTINCT phone, department FROM `users` WHERE ((SUBSTRING(phone,1,3) = '399')
I have this straight forward query: SELECT f.id, f.format_type, h.newspaper_id FROM newspapers_formats f LEFT

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.