Hi,
Michael Tam wrote:
>
> Hi All,
>
> I just installed resin-cmp-1.0.5 with Apache1.3.22 and mysql3.23.47. I
> used m.mmysql.2.0.8 JDBC driver with the following config segment in my
> resin.conf:
>
>
>
> jdbc/test
> javax.sql.XADataSource
>
[snip]
Do you use MySQL or My
Hi All,
I just installed resin-cmp-1.0.5 with Apache1.3.22 and mysql3.23.47. I
used m.mmysql.2.0.8 JDBC driver with the following config segment in my
resin.conf:
jdbc/test
javax.sql.XADataSource
The initialization servlet did create and populate tables into
> When I run test.php I get this:
>
> Warning: Supplied argument is not a valid MySQL result resource in common.php on
>line 27
> 0
>
> Here are lines 25-27:
> 25: $sql = "select urate, arate, inhits from sitestats where id = $id";
> 26: $r = mysql_query($sql);
> 27: $row = mysql_fetch_array($r)
> I thought using the result identifier returned by mysql_query in
> mysql_fetch_array was perfectly legal.
mysql_query() doesn't always return a valid result identifier if an error
occurs (echo mysql_error()) or if no rows are returned.
-
I'm using MySQL with PHP (just learned MySQL so bear with me).
Here's a two part program:
Test.php:
Common.php:
3000) { $hits = 3000; }
$score = (($arate * 5) + ($urate * 2) + ($inhits / 100));
echo($score);
//$sql = "update sitestats set score=$score where id = $id";
//mysql_query($s