Re: [PHP-DB] Re: PHP and MySQL queries...

2001-10-23 Thread Jason
t; element names refer directly to the variables after SELECT in your SELECT > query. > I did the same in the Phone line. > > -Original Message- > From: Jason Gerfen [mailto:[EMAIL PROTECTED]] > Sent: Tuesday, October 23, 2001 2:23 PM > To: [EMAIL PROTECTED] > Subject

Re: [PHP-DB] Re: PHP and MySQL queries...

2001-10-23 Thread Jason Wood
Let me guess, the parse error is on the last line of the file? I get that all the time, its usually caused by a loop thats still open... and, in your case, your "do" and "if" statements arent closed try this. mysql_connect ("db_hostname", "db_username", "db_password"); mysql_select_db ("

RE: [PHP-DB] Re: PHP and MySQL queries...

2001-10-23 Thread Rick Emery
MAIL PROTECTED]] Sent: Tuesday, October 23, 2001 2:23 PM To: [EMAIL PROTECTED] Subject: RE: [PHP-DB] Re: PHP and MySQL queries... Ok here is what I have done after your suggestions... if ($date == "") {$date = '%';} $result = mysql_query ("SELECT fname,lname,address,city,s

Re: [PHP-DB] Re: PHP and MySQL queries...

2001-10-23 Thread Jason
Ok here is the script after changes... Name: ".$row['fname, lname']."\n"; if (mysql_num_rows($results) ) { while( $row = mysql_fetch_array($result) ) { } } else { print "No rows found"; } ?> And now I get a parse error on line 201 which is below the html and php code, so there isn't anything to

RE: [PHP-DB] Re: PHP and MySQL queries...

2001-10-23 Thread Rick Emery
First o all, GET RID of the 19 constructs using mysql_result(). You've already captured the row with the $row=mysql_fetch_array(). mysql_result() cannot be mixed with mysql_fetch_arry(). So instead of: echo "Address: "; printf(mysql_result($result,$count,"address")); echo "\n"; use: print "Addr