Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

PHP commands to access a Sybase or Oracle database.

Status
Not open for further replies.

jxfish2

Technical User
Jan 24, 2002
183
US
To access a MySQL database from PHP, several builtin commands are available:

mysql_pconnect
mysql_connect
mysql_select_db
mysql_query
mysql_fetch_array
mysql_fetch_row
mysql_fetch_object
mysql_result

etc...

Does anyone know the equivalent commands for Sybase and Oracle?

If there's anything different in the syntax, I'd greatly appreciate some examples...

Finally, is there any documentation available on this topic?

TIA

Joe F.
 
I've got a list, and some examples of both the Sybase and Oracle commands...

However, I'm getting the following error when I attempt to connect to the database:

Fatal error: Call to undefined function: sybase_connect() in ~user/form.php

The code I'm using follows: (Variables set!)

$db = sybase_connect($HOST, $UID, $PWD);

Is there some module for PHP, that I haven't loaded yet?

I thought the "sybase_connect" function was an internal PHP function...

Can anyone tell me what I'm doing wrong?

I can log into the server using an ISQL command, and run various SQL commands...

Any help would be greatly appreciated...

Joe F.
 
Yes, you did not load the sybase library.

If you use windows, you must load php_sybase.dll.

If you use linux, you must compile with --with sybase (or something like this) Anikin
Hugo Alexandre Dias
Web-Programmer
anikin_jedi@hotmail.com
 
I'm using Sybase, PHP and Apache on HP-UX...

HP has packaged the PHP program inside of it's Apache software, so that when you install Apache, it automatically configures PHP...

If Apache, PHP and Sybase are already running on my system, is there a way to add the Sybase library after the fact? From the command line, or by editing a configuration file someplace...

I don't want to re-compile or re-install the application here at work... (I would do it, if it were my own personal home system... But this is on a test machine in our Lab, and too many others use this machine... I don't want to take any chances of the application not working properly, by trying to re-compile from scratch...)

TIA

Joe F.
 
ok ... in windows, the system i know better there is a function called dl. But i don't know if it works on linux. Sorry. Anikin
Hugo Alexandre Dias
Web-Programmer
anikin_jedi@hotmail.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top