Date: 07/26/02
- Next message: JJ Harrison: "[PHP-DB] Error is SQL(works in phpMyAdmin)"
- Previous message: Georgie Casey: "[PHP-DB] SQL order by queries"
- Maybe in reply to: Jas: "[PHP-DB] Column count error?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Did you copy and paste the code?
There is no such function as mysql_numrows, it has to be mysql_num_rows.. I
don't know why you didn't get an error for it?
Gurhan
> "Jas" <jlgerfen <email protected>> wrote in message
> news:20020726164257.74810.qmail <email protected>
> > I am not sure how to resolve this type of error, any help is
appreciated.
> > TIA
> > Jas
> >
> > /* Error message */
> > Column count doesn't match value count at row 1
> >
> > /* Code to query db for username and password */
> > require '/home/bignickel.net/scripts/admin/db.php';
> > $db_table = 'auth_users';
> > $sql = "SELECT * from $db_table WHERE un = \"$u_name\" AND pw =
> > password(\"$p_word\")";
> > $result = <email protected>($sql,$dbh) or die('Cannot execute query, please
> try
> > again later or contact the system administrator by email at
> > support <email protected>');
> > /* Loop through records for matching pair */
> > $num = mysql_numrows($result);
> > if ($num !=0) {
> > print "You have a valid username and password combination";
> > } else {
> > header("Location: blank.php"); }
> >
> > /* Table structure of db */
> > CREATE TABLE auth_users (
> > user_id int(11) NOT NULL auto_increment,
> > f_name varchar(255) default NULL,
> > l_name varchar(255) default NULL,
> > email_addy varchar(255) default NULL,
> > un text,
> > pw text,
> > PRIMARY KEY (user_id)
> > ) TYPE=MyISAM;
> >
> >
> >
> >
> >
> >
> > --
> > PHP Database Mailing List (http://www.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php
> >
>
-- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
- Next message: JJ Harrison: "[PHP-DB] Error is SQL(works in phpMyAdmin)"
- Previous message: Georgie Casey: "[PHP-DB] SQL order by queries"
- Maybe in reply to: Jas: "[PHP-DB] Column count error?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

