>>>>> "T" == Ted  <ted / datacomm.com> writes:

T>       4     begin
T>       5         $my = Mysql.connect('localhost', 'xxx','xxx', 'mysql')
T>       6     rescue => err
[...]
T>      10     begin
[...]
T>      18         begin

 Why do you need 3 blocks 'begin ... rescue' ? One is suffisant : the error
 message will give you the reason of the failure

 This is not the same with php

T>       3 $conn = mysql_connect('localhost','xxxxx','xxxxxxx');
T>       4 if ($conn == FALSE) {

 here you must test the result of mysql_connect

T>       5     echo 'Connection failed: '.mysql_error($conn);
T>       6 } else {
T>       7     mysql_select_db('mysql', $conn);
T>       8     $query = "select host, user, password from user";
T>       9     $res = mysql_query($query, $conn);
T>      10     if ($res == NULL) {

 here you must test the result of mysql_query



Guy Decoux