[PHP-DB] MDB2 help needed

2008-06-12 Thread YVES SUCAET
Hello, What's the equivalent of mysql_error() and mysql_errno() in MDB2? When I'm sending an incorrect SQL-statement to the server and it fails, all I'm getting is MDB2 Error: syntax error. Thanks in advance, Yves Sucaet Iowa State University -- PHP Database Mailing List

Re: [PHP-DB] MDB2 help needed

2008-06-12 Thread Laura Longo
Hi Yves, to understand if an error is occured you can use the static method Pear::isError($db) where $db is an instance of MDB2 object. To get the specific error you can use the MDB2 method getMessage() ($db-getMessage()). Hope this help, Laura Hello, What's the equivalent of mysql_error()

[PHP-DB] PHP to MS SQL Package

2008-06-12 Thread Wei, Alice J.
Hi, I am currently using a Linux box with Fedora 9.0 and I am trying to connect PHP to a MS SQL database. All the permissions on the MS SQL database is up to date and accurate, but I consistently get errors that say PHP Fatal error: Call to undefined function mssql_connect() in

Re: [PHP-DB] PHP to MS SQL Package

2008-06-12 Thread Olavi ivask
Hi, you need to install freetds before compiling php. compile php: ./configure [--with-apxs --with-mysql...] --with-sybase=/usr/local/freetds make make install Olavi Ivask On Thu, 2008-06-12 at 12:14 -0400, Wei, Alice J. wrote: Hi, I am currently using a Linux box with Fedora 9.0 and I

RE: [PHP-DB] PHP to MS SQL Package

2008-06-12 Thread Wei, Alice J.
From: Olavi ivask [EMAIL PROTECTED] Sent: Thursday, June 12, 2008 12:57 PM To: Wei, Alice J. Cc: php-db@lists.php.net Subject: Re: [PHP-DB] PHP to MS SQL Package Hi, you need to install freetds before compiling php. compile php: ./configure [--with-apxs --with-mysql...] You actually meant

Re: [PHP-DB] PHP to MS SQL Package

2008-06-12 Thread Ken Keefe
Alice, make sure the php-mssql package is installed. # yum install php-mssql You shouldn't have to compile php or freetds as there are packages available to do what you want... Ken On Thu, Jun 12, 2008 at 11:14 AM, Wei, Alice J. [EMAIL PROTECTED] wrote: Hi, I am currently using a Linux box

RE: [PHP-DB] PHP to MS SQL Package

2008-06-12 Thread Wei, Alice J.
Hi, After stopping the Apache server, I reinstalled PHP by adding the line you had below, and then restarted Apache. ./configure --with-apxs2=/usr/local/apache/bin/apxs \ --with-sybase=/usr/local/freetds --prefix=/usr/local/apache/php \ make make install After this has been completed, I

RE: [PHP-DB] PHP to MS SQL Package

2008-06-12 Thread Wei, Alice J.
From: Ken Keefe [EMAIL PROTECTED] Sent: Thursday, June 12, 2008 1:44 PM To: Wei, Alice J. Cc: php-db@lists.php.net Subject: Re: [PHP-DB] PHP to MS SQL Package Alice, make sure the php-mssql package is installed. # yum install php-mssql You shouldn't have

RE: [PHP-DB] PHP to MS SQL Package

2008-06-12 Thread Olavi ivask
Hello, Here is a good article about ms-sql PHP on Linux (http://www.devarticles.com/index2.php?option=contenttask=viewid=667pop=1page=0hide_js=1) Olavi Ivask On Thu, 2008-06-12 at 13:43 -0400, Wei, Alice J. wrote: Hi, After stopping the Apache server, I reinstalled PHP by adding the line

Re: [PHP-DB] PHP to MS SQL Package

2008-06-12 Thread Ken Keefe
Make sure some where in your php.ini you have a line that looks like this and is not commented out: extension=mssql.so I haven't used a fedora box as a php webserver in over a year, so my memory of their config file layout is pretty rusty. However, I'm pretty sure they consolidate everything

Re: [PHP-DB] MDB2 help needed

2008-06-12 Thread YVES SUCAET
Thanks for trying to help, but that's what I'm doing already. I already know if something's wrong. But instead of a MySQL error reference I'm only getting MDB2 Error: syntax error in return from the getMessage() function. I want to obtain more info regarding the error (such as foreign key

Re: [PHP-DB] MDB2 help needed

2008-06-12 Thread James Lucas
Hi Yves, As the error object should be an PEAR_Error object then the function $result-getUserInfo() should give you the information you need. An example being: $record_sql = SELECT * FROM non_existent_table; $record_result = $mdb2-query($record_sql); if (PEAR::isError($record_result)) {

Re: [PHP-DB] Excel to xml

2008-06-12 Thread James Lucas
ioannes wrote: I am on a cPanel type shared server, they don't have a way of converting an Excel spreadsheet to xml (to read it into the database). This is a pity because xls files are smaller for the purpose of uploading them. Is there anyway to do this otherwise on a server, perhaps a

[PHP-DB] PHP - FreeTDS - UnixODBC - MS-SQL Am I missing something....

2008-06-12 Thread Bill Sappington
Hey there folks... OK, so I am getting to the point where I am not sure where to look... It would seem that the combination of PHP ODBC are just not happy. This is running on SLES 10 SP1, php 5.1.2 Zend Eng 2.1.0 FreeTDS is latest stable, UNIXOdbc Latest Stable I can connect just fine ie:

RE: [PHP-DB] PHP to MS SQL Package

2008-06-12 Thread Wei, Alice J.
Hi, I hope this would allow me to address this problem to a step further now. After getting FreeTDS installed, my error has now moved away from the undefined function level. I have looked through the PHP help from http://us3.php.net/manual/en/function.mssql-connect.php, and configured

Re: [PHP-DB] PHP to MS SQL Package

2008-06-12 Thread Ken Keefe
That error message tells you that you are getting closer. Next step would be to make sure you have a connection to that system: $ ping 192.168.10.128 Next thing I would do is see if that port is open on the server: $ telnet 192.168.10.128 1433 If it says something about Escape character is ...