[PHP] why does my querry work in the mysql client but not in php?

2002-08-29 Thread Michael Knauf
I'm in OS X 10.2 (Jaguar) Apache/PHP/MySQL are all playing happily together, so it's time to get some work done. From the MySQL client, this query does what I expect it to: update endpage set productname='Berenice lamp', bgcolor='eec472', imgsrc='bereniceep.jpg', img_orientation='horizontal',

RE: [PHP] why does my querry work in the mysql client but not in php?

2002-08-29 Thread Jay Blanchard
[snip] from the php page however, it does not work, even though it appears to be generating a perfectly good querry... Here's the PHP $connection = mysql_connect(server, user, pass) or die(Couldn't connect.); $db = mysql_select_db($db_name, $connection) or die(Couldn't select database.); $query

RE: [PHP] why does my querry work in the mysql client but not in php?

2002-08-29 Thread Jay Blanchard
[snip] 2. Trap MySQL errors for the query by doing something like this; if(!($result = mysql_query($query, ))){ print(MySQL reports: . mysql_error . \n); exit(); } [/snip] TYPO!!! :^] Should be mysql_error() (note the parentheses) HTH! Jay