Member Offer
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

[PHP] Can some one tell me why this is failing please

Discussion in 'Website Design Forum:' started by Jazajay, Nov 8, 2010.

  1. Jazajay

    Jazajay Active Member

    Right peeps,
    This keeps failing and I'm not sure why. :mad:

    $query="SELECT id FROM jos_users WHERE username='".$username."'";

    $query2="SELECT city, country, vm_newsletter FROM jos_vm_user_info WHERE user_id='".$id."'";
    $row2=$rows[0]; // failing here


    The output I get is in green below:

    Username - james
    City -
    Country -
    Newsletter -
    ID - 174
    Rows - Array
    Rows 0 -
    Row2 -

    Really confused as to why that fails?????? :confused:

    Any help????
  2. Jazajay

    Jazajay Active Member

    This thread can be closed I was trying to select the data from a table that hadn't had the data inserted into yet.Hence nothing to select. Errr......anyhoo. :cry:

Share This Page