Re: [PHP] Can anyone tell me why this code doesn't insert anything?

2004-02-23 Thread Richard Davey
Hello Brian, Monday, February 23, 2004, 5:11:55 PM, you wrote: BD> $query = "INSERT INTO invoices BD> ('ip','total','creation','first_name','email','session','last_name') BD> VALUES BD> ('0.0.0.0','0.00',NOW(),'Bob','[EMAIL PROTECTED]','12345','Smith')"; You shouldn't wrap the column names in q

Re: [PHP] Can anyone tell me why this code doesn't insert anything?

2004-02-23 Thread BAO RuiXian
Brian Dunning wrote: On Feb 23, 2004, at 9:18 AM, BAO RuiXian wrote: Have you tried to insert the same SQL statement manually, i.e., not via your php scirpt? I did the insert in phpmyadmin & copied & pasted the SQL that it generated, and it's the same, so I'm left scratching my head big tim

Re: [PHP] Can anyone tell me why this code doesn't insert anything?

2004-02-23 Thread Jason Wong
On Tuesday 24 February 2004 01:11, Brian Dunning wrote: > This inserts nothing into the database, but returns no error that I can > see. How come? What's wrong with it? mysql_error() -- Jason Wong -> Gremlins Associates -> www.gremlins.biz Open Source Software Systems Integrators * Web Design &

Re: [PHP] Can anyone tell me why this code doesn't insert anything?

2004-02-23 Thread Adam Voigt
Change your query line to this: $result = mysql_query($query) or die(mysql_error()); What does it output? On Mon, 2004-02-23 at 12:11, Brian Dunning wrote: > This inserts nothing into the database, but returns no error that I can > see. How come? What's wrong with it? > > $dbname = "my_databa

Re: [PHP] Can anyone tell me why this code doesn't insert anything?

2004-02-23 Thread BAO RuiXian
Brian Dunning wrote: This inserts nothing into the database, but returns no error that I can see. How come? What's wrong with it? $dbname = "my_database"; $dbconnection = mysql_connect("mysql05.powweb.com","my_user","my_pass"); mysql_select_db($dbname, $dbconnection); $query = "INSERT INTO inv

RE: [PHP] Can anyone tell me why this code doesn't insert anything?

2004-02-23 Thread Sam Masiello
What happens if you echo out $query to the browser window and try to copy and paste the query into a command line mysql session (be sure to connect to the database using the same authentication credentials that you have in the script)? Does it work? --Sam Brian Dunning wrote: > This inserts n

[PHP] Can anyone tell me why this code doesn't insert anything?

2004-02-23 Thread Brian Dunning
This inserts nothing into the database, but returns no error that I can see. How come? What's wrong with it? $dbname = "my_database"; $dbconnection = mysql_connect("mysql05.powweb.com","my_user","my_pass"); mysql_select_db($dbname, $dbconnection); $query = "INSERT INTO invoices ('ip','total','cr