Re: problems 'adding' to MySQL DBs

From: Date: Mon, 20 May 2002 18:17:23 +0000
Subject: Re: problems 'adding' to MySQL DBs
References: 1  Groups: php.db 
Request: Send a blank email to php-db+get-19290@lists.php.net to get a copy of this message
Here's a hint...ALWAYS use proxies for your query strings. $query = "insert into firsttab (first_name, last_name) values ('$first_name', '$last_name')"; mysql_query($query); var_dump($query); // copy output and paste into the mysql // command line interface. You can also use the mysql_error() and mysql_errno() calls to see what went wrong. -Szii ----- Original Message ----- From: "cin" <ting@chat.carleton.ca> > <html> > <body> > <? php > mysql_connect("localhost", "test", "testpw"); > mysql_select_db("testdb"); > msyql_query("insert into firsttab (first_name, last_name) values > ('$first_name', '$last_name')"); > print ($first_name); > print (" "); > print ($last_name); > print ("<p>"); > print ("blah blah blah"); > ?> > </body> > </html> > > i have used the appropriate grant privileges to ensure said user can indeed > do the requested action in the script. > > > any help is appreciated. > > > thanks. > > > cin > > > > > -- > PHP Database Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php

« previous php.db (#19290) next »