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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T14:12:32+00:00 2026-06-13T14:12:32+00:00

I am having a Problem with a MySQL Query. My Database Structure looks like

  • 0

I am having a Problem with a MySQL Query. My Database Structure looks like this:

id (PRIMARY_KEY, AUTO_INCREMENT)

deviceID (TEXT)

name (TEXT)

latidude (TEXT)

longitude (TEXT)

Now this is how the first Entry looks like (in the order like above):

1 fc29daf8-bc53-4235-a1df-7d54b4e67b4c username 46.993393 5.448076

I’m search the Database with this Query:

$result = mysql_query("SELECT name FROM position WHERE deviceID = '$deviceID'");

But it doesn’t find the entry. The deviceID is obtained from $_GET and it is exactly the same as this in the database. I also checked if it is right by printing it with echo.

It is sent to the PHP file like this:

read_uniqueid.php?deviceID=fc29daf8-bc53-4235-a1df-7d54b4e67b4c

and read from the .php file like this:

$deviceID = $_GET['deviceID'];
echo $deviceID.'<br>';

After those lines the query from above is sent.

There is a working connection to the database.I only have a Problem in the query if I search the name like that it works then I get all the other Entries.

This query works and gives me all entries:

$result = mysql_query("SELECT * FROM position WHERE name = '$name'");
  • 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-13T14:12:33+00:00Added an answer on June 13, 2026 at 2:12 pm

    Try like,

    $result = mysql_query("SELECT name FROM position WHERE deviceID like '%$deviceID%'");
    

    the column deviceID may have space in before or after the value.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am having a problem in mysql query, I have date saved in database
I'm not a MySQL expert and am having problem with this... So, I have
I am having trouble with the query in this code. The problem is one
I am having a problem with BLOB fields in my MySQL database - when
I am having a problem writing a MySQL query to get data from 2
I am having a very strange problem inserting values into my mysql database, using
I am having a problem with PHP from that adds data to MYSQL database
Having an odd problem with a MySQL query, I can't really figure out how
I am having a problem with a website, connecting to a MySQL database using
I'm having a problem with sprintf() , using it to store a mysql query

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.