• 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


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????


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: