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

  • Home
  • SEARCH
  • 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 6212567
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T06:32:22+00:00 2026-05-24T06:32:22+00:00

I was testing a simple employee application and got this Unknown column ‘mush’ in

  • 0

I was testing a simple employee application and got this Unknown column ‘mush’ in ‘where clause’ error. There is someone called ‘mush’ in the name’s column.

Here’s my code

 <?php 
 // Connects to your Database 
 mysql_connect("localhost", "myuser", "mypass") or die(mysql_error()) ; 
 mysql_select_db("peoplesdb") or die(mysql_error()) ; 

 //Retrieves data from MySQL 
$data = mysql_query("SELECT * FROM employees WHERE name = $_GET[name]") or die(mysql_error()); 
echo "<table border=\"1\">";
echo "<tr>";
echo "<th>First Name:</th>";
echo " <td>Last Name</td>";
echo "</tr>";
echo "<tr>";
echo "<th rowspan=\"3\"><img src=\"../about/images/".$data['photo']."\" width=\"205\" height=\"205\" alt=\"\" title=\"\"></th>";

echo $data['name'];
echo "<td>".$data['name'] ."</td>";
echo "</tr>";
echo "<tr>";
echo "<td>".$data['lastname'] ."</td>";
echo "</tr>";
echo "</table>";
?>

The aim was to display the detail on a table with a picture to the left of the table.
Here’s how I tried calling the application:

http://localhost:8080/displaymembers.php?name=mush.

I have a table which contains these columns:

name, photo, telephone, lastname and dob.

Is there anything I’m going wrong that stops the details from displaying? I would like your help.

Helen.

  • 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-05-24T06:32:23+00:00Added an answer on May 24, 2026 at 6:32 am

    First, you need to quote your inputs, second you need to escape them:

    mysql_query("SELECT * FROM employees WHERE name = '".
       mysql_real_escape_string( $_GET['name'] ) ."'");
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am testing a simple threadpool solution before I put it in my application,
I'm creating a simple blackberry application for testing purposes and my custom buttons do
I am testing a simple producer/ consumer example in android this is what i'm
I am testing a simple query to get data from an AS400 database. I
I have a simple website I'm testing. It's running on localhost and I can
I'm storing a simple java.util.date in an Oracle XE database via hibernate. When testing
Testing: return request.getCookies() == null; is not an appropriate way test. Is there another
I have the following JUnit test. The method that I'm testing is quite simple,
Yet another simple question about unit testing model objects that uses data access layer.
I have a very simple AsyncTask implementation example and am having problem in testing

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.