1. This website uses cookies. By continuing to use this website you are giving consent to cookies being used.
    For information on cookies and how you can disable them visit our Cookie Usage page.
    Dismiss Notice

PHP How do I trace this php sql error?

Discussion in 'Web Development' started by jrodrick4, Dec 29, 2009.

  1. jrodrick4

    jrodrick4 New Member

    i found this error:
    Query failed : Unknown column 'admin' in 'where clause'

    well in fact, i successfully pass its id which is 'admin' to other page that will be using its value to a certain query.

    here's my query:

    $strID=$_GET['ID'];"SELECT userid,password,username,email,active FROM user WHERE userid=".$strID;
     
  2. Mimoun

    Mimoun Administrator Staff Member Director Verified Member

    I don't know the layout of your database, but in most cases userid is a number and not text like 'admin'. The userid of an admin is in most cases 1.