Re: how do I update fields in a mysql database with php?
| From: | (David Tod Sigafoos) | Date: | Thu, 27 Sep 2001 13:41:45 +0000 |
| Subject: | Re: how do I update fields in a mysql database with php? | ||
| References: | 1 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-12779@lists.php.net to get a copy of this message | ||
Try something like this ...
$sql_query = "SELECT newscat_id,newscategory,newscat_status FROM
dvd.news_categories WHERE newscat_id='$newsid' "
$res = mysql_query( $sql_query) or
DIE ("MySQL gave error: " . mysql_errno() . "<br>MySQL Error
String: " . mysql_error()
. "<br>Query: " . $sql_query);
This should give you a good idea what the error is ..
When ever you are creating new scripts with db queries it is a handy
idea to see what the server is putting our during error conditions.
DTSig
David Tod Sigafoos
On Wed, 26 Sep 2001 18:09:36 +0200, tommyhome@softhome.net (Tommy
Nilsson) wrote:
>I got a bit of a problem:
> $result1 = mysql_query ("SELECT
>newscat_id,newscategory,newscat_status FROM dvd.news_categories WHERE
>newscat_id='$newsid'")
>
>shouldn't that work?
>Or what is wrong with it?
>Im running apache/mysql om windows XP.