Hello Gurus,
I am absolutely new to PHP. I am trying to extend WebCalendar-0.9.42(http://webcalendar.sourceforge.net). I want WebCal to work on my setup having sybase.
I can connect to the database successfully and even execute queries. My problem starts when I put the same code in WebCal programs. Following are the Webcal functions I am using:
<CODE>
function dbi_query ( $sql ) {
if ( strcmp ( $GLOBALS["db_type"], "sybase" ) == 0 ) {
$res = sybase_query ( $sql );
if ( ! $res )
dbi_fatal_error ( "Error executing query: " . dbi_error() .
"\n\n<P>\n" . $sql );
return $res;
} else {
dbi_fatal_error ( "dbi_query(): db_type not defined." );
}
}
function dbi_fetch_row ( $res ) {
if ( strcmp ( $GLOBALS["db_type"], "sybase" ) == 0 ) {
return sybase_fetch_array ( $res );
} else {
dbi_fatal_error ( "dbi_fetch_row(): db_type not defined." );
}
}
</CODE>
When I run the program I get this error :
Warning: sybase_fetch_array(): supplied argument is not a valid Sybase result resource in /var/www/WebCalendar-0.9.42/includes/php-dbi.php on line 132
Please help me All.
Parvez