Jump to content


Photo

inner join help


  • Please log in to reply
1 reply to this topic

#1 spires

spires
  • Members
  • PipPipPip
  • Advanced Member
  • 492 posts

Posted 30 August 2006 - 09:58 AM

Hi,

I'm trying to select all of the 'username' values from two tables.
tables:
user_info
submit1

So i can see whether the username is already taken.

Can anyone see what is wrong with this code? I keep getting "query 2 failed"

Thanks for your help.

	$query2 = "SELECT * FROM user_info INNER JOIN submit1 ON user_info.username = submit1.username WHERE username='$usname'";
	$result2 = mysql_query($query2) or die ("query 2 failed");

How to make over $600 a day from AdSense? Discover EXACTLY how he does it in these videos:
http://www.adsense-online.com

#2 Guest_huey4657_*

Guest_huey4657_*
  • Guests

Posted 30 August 2006 - 11:51 AM

$query2 = "SELECT * FROM user_info, [other table goes here]

and is

$usname spelt correctly?




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users