PDA

View Full Version : Getting error for the last line of this code


modeler4547
08-09-2004, 11:23 PM
<html>
<head>
</head>
<title>Enter SQL Username and Password To Access A Filename Array Listed In PASS.php</title>

<?php
if ($submit) {
$db = mysql_connect("localhost", "xxxxx_xx","xx")or die ('I cannot connect to the database because: ' . mysql_error());
mysql_select_db("xxxxx_xxxxx",$db);
{mysql_num_rows(mysql_query("SELECT * FROM members username WHERE username = 'gdogs' and password = 'gdogs'"))};

kathpave
08-17-2004, 08:27 AM
I'm not sure what your error is, but it could be that your select statement is incorrect. I think you want "SELECT * FROM members WHERE username = 'gdogs' and password = 'gdogs'". The generic form for a select statement is "SELECT [columns|*=all columns] FROM [TABLE] WHERE {condition}.