RE: [PHP-DB] error

From: Date: Wed, 08 May 2002 08:23:18 +0000
Subject: RE: [PHP-DB] error
Groups: php.db 
Request: Send a blank email to php-db+get-19033@lists.php.net to get a copy of this message
Howdi Maureen Nice one ! worked perfectly ....well spotted THANKYOU !!!! ****MWWWAAAH****** -----Original Message----- From: Maureen [mailto:biorn@ebmstpa.com] Sent: Tuesday, May 07, 2002 9:14 AM To: Php-Db-List (E-mail) Subject: Re: [PHP-DB] error One thing I noticed quickly. You have too many opening ( on the line that says: while (($row = mysql_fetch_array($result, MYSQL_ASSOC)) 3 opening and 2 closing. This would cause a parse error. Without knowing which line is line 11, it is hard to say if there is anything else. HTH MB Chris Grigor <cgrigor@mweb.com> said: > Howdi guys > > any help on this would be greatful > > I have a page that submits to this script with a value of search > > but when I submit it gives me an error Parse error: parse error in /var/www/html/ul/mysql_fetch_array.php on line 11 > anyhelp here would be greatful, I dont see what the error could be > > Thanks > > Chris > > > <?php > > mysql_connect("localhost", "username", "password") or > die("couldnt connect"); > mysql_select_db("call_manage"); > > $query = "SELECT company_name, ticket_id, date from log_request where company_name like '%$search%'"; > $result = mysql_query($query); > > while (($row = mysql_fetch_array($result, MYSQL_ASSOC)) > printf ("Company: %s Ticket id: %s Date: %s", $row ["company_name"], $row["ticket_id"], $row["date"]); > > mysql_free_result($result); > ?> > > -- > 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

« previous php.db (#19033) next »