Re: [PHP-DB] Efficient way to access MS SQL server

2008-02-04 Thread Frank M. Kromann
Using the mssql extension based on Microsofts library (ntwdblib.dll) will have limitations like column length 30 bytes and character columns has a max length of 255 bytes. If you use the same extension based on the FreeTDS version of the dblib library these limitations goes away. Even on Windows p

Re: [PHP-DB] How do I use chunks for nText fields?

2007-03-22 Thread Frank M. Kromann
Keep calling odbc_resilt() untill everything is returned: $str = ""; while ($tmp = odbc_result($rs, $column)) { $str .= $tmp; } You can also use odbc_longreadlen() to set the number of bytes returned by each call to odbc_result(). - Frank > Hi, > > I've got a PHP 5 based website, talking t

Re: [PHP-DB] Connecting to MS Access Database using PHP via ODBC.

2007-03-15 Thread Frank M. Kromann
Sounds like a permission problem. Make sure the IIS user (IUSR_) has access to the share. - Frank > Hello, > > Im using PHP to connect to a Microsoft Access database which is not stored > on the machine where IIS is installed. It's located on a different file > server on the network. > > I ha

Re: [PHP-DB] Re: MSSQL Server

2007-02-21 Thread Frank M. Kromann
Or use the mssql.secure_connection = On in php.ini to allow the system to use the current user account for authentication. - Frank > Hello, >If you can change the SQL Server Authentication to the Mixed Mode > (Windows and Remote User), your problem will be fixed. If you use the Unix > l

Re: [PHP-DB] Problem with PHP 4.4.4 and MSSQL in Centos

2007-01-12 Thread Frank M. Kromann
so I think you will be happy about the change. - Frank > Hi Frank, > > El vie, 12-01-2007 a las 10:49 -0800, Frank M. Kromann escribió: > > > 1) Check the version of FreeTDS on both systems. > > It proved irrelevant. See above. > > > 2) Check the freetds.c

Re: [PHP-DB] Problem with PHP 4.4.4 and MSSQL in Centos

2007-01-12 Thread Frank M. Kromann
Hi Claudio, 1) Check the version of FreeTDS on both systems. 2) Check the freetds.conf file for differences (use the sam TDS version) 3) Check that php is compiled using --with-mssql on both systems (--with-sybase will give you aliases to some mssql_( functions but not all) - Frank > Hi all! >

Re: [PHP-DB] Php 5 and Mysql on Windows

2006-10-03 Thread Frank M. Kromann
IIRC: When you are using ISAPI you must have php,ini in the windows directory. If you are using CGI you can have it in the same directory as all other PHP files. - Frank > Hi > > Make sure that the php.ini file being used is the one you thinkit is. > > I keep mine in the php directory, so I ha

Re: [PHP-DB] SQL Server COM question

2006-08-09 Thread Frank M. Kromann
Try the MSDN library: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/ado270/htm/mdobjconnectionpme.asp - Frank > Chris wrote: > > Todd Cary wrote: > >> [Sorry - I misposted this in the General group] > >> > >> I am in the process of converting my clients PHP scripts that are >

Re: [PHP-DB] LIMIT

2006-06-29 Thread Frank M. Kromann
What about 'select count(*) from aTable' - Frank > Is there a way to get the number of rows that would have been returned had > there not been a LIMIT clause in a SELECT statement? > > For example, if > Query #1) SELECT * FROM aTable > would normally return 100 rows. But > Query #2) SELECT * FR

RE: [PHP-DB] Problem installing mssql extension

2006-01-25 Thread Frank M. Kromann
Hi Jim, Using PHPRC is not needed on Win32. It's an option. If you read my post again you will see that I did not say anything about putting PHP dll's in system32. I was refering to ntwdblib.dll. This is not a PHP dll, it's a Microsoft DLL that will be installed with the CLient Tools. I agree wi

Re: [PHP-DB] RE: Problem installing mssql extension

2006-01-25 Thread Frank M. Kromann
The MSSQL extension does not rely on MySQL in any way. The only required DLL is ntwdblib.dll. It would help if you could post any error messages or some sample code that shows your problem. The 'correct' installation is to copy ntwdblib.dll to windows\system32 on the system that runs the PHP scri

Re: [PHP-DB] php_mssql - 'space' instead of empty string

2005-08-25 Thread Frank M. Kromann
All versions of ntwdblib.lib has this problem. The problem was introduced when it was decided to fix another problem haver a char column with value 'aaa ' would be reduced to 'aaa' by the php extension. I have not tested this issue with the FreeTDS version of this extension (so far only availabl

Re: [PHP-DB] Connecting to SQL Server

2005-08-10 Thread Frank M. Kromann
Hi Todd, PHP has native support for MSSQL Server. On a *nix platform you need to install and configure FreeTDS and recompile php using --with-mssql, but then you will be able to use the mssql_* functions. - Frank > I have been asked by my client to use SQL Server for my php application > (u

Re: [PHP-DB] PHP Bug handling Messages from MSSQL ?

2005-07-12 Thread Frank M. Kromann
Hi Denio, The function name should say it all, mssql_get_last_message() returns the last and only the last message from the server. I'll add an item on my todo list to implement a mssql_get_server_messages() function tal will allow you to get all messages from the previous mssql_query() call. This

Re: [PHP-DB] PHP/MySQL with Javascript

2005-06-15 Thread Frank M. Kromann
You can have PHP generate a small javascript section where you define the variables or you can use cookies. - Frank > Hi there everyone, > > > > Just a quick question, I have a login system that stores whether you are > logged in or not with a PHP Session. However, I need it so when people >

Re: [PHP-DB] Having a DUH Moment with mysql_fetch_array

2005-05-09 Thread Frank M. Kromann
Hi Jim, echo cannot display the content of an array or object. try print_r() or var_dump() - Frank > Ok, > > > > I'm a PHP newbie and I'm having a problem. All I want to do is parse > some information out of a database and send someone and email stating > that their posting has been approve

Re: [PHP-DB] where can i get "fixed" mssql extension??

2005-03-19 Thread Frank M. Kromann
If you are looking for precompiled win32 binaries you can find them here: http://kromann.info/php.php or included in the zip files on http://snaps.php.net - Frank > Does Anyone know where can i get the latest and already fixed mssql extensions?? > > thank you > > -- > PHP Database Mailing List

RE: [PHP-DB] IIS/PHP question

2004-11-16 Thread Frank M. Kromann
Sessions work fine with IIS. Check you php.ini file for register_globase if that is off (default) you can only access your variables through $_SESSION[] - Frank > can you show some code? > > bastien > > >From: "Adil" <[EMAIL PROTECTED]> > >To: [EMAIL PROTECTED] > >Subject: [PHP-DB] IIS/PHP que

Re: [PHP-DB] IIS and php sessions

2004-11-15 Thread Frank M. Kromann
Hi Adil, You need to configure session.save_path in php.ini. This setting needs to point to a directory where the IIS user can write files. If you are running the ISAPI version of php you also need to restart the web service for the changes to take place. - Frank > Hey everyone, > > I'm trying

Re: [PHP-DB] Re: Debian & mssql_init

2004-07-14 Thread Frank M. Kromann
mssql_init() is a function used to initialize stored procedures and it was introduced inphp 4.1.0 (according to the docs). The versions you are listing for both PHP and FreeTDS are very old so I would suggest updating these first. - Frank > "Damien Babilon" <[EMAIL PROTECTED]> wrote in message >

Re: [PHP-DB] Multiple MSSQL Connections

2004-07-02 Thread Frank M. Kromann
That depends on the SAPI you are using. With CGI or FastCGI there is no problem but with ISAPI or Apache module you might get problems, as the DBLIB library used to build the extension is not thread safe. - Frank > I am currently writing code to write and read data to a Microsoft SQL 2000 > data

[PHP-DB] RE: [PHP-WIN] [ANNOUNCEMENT] ODBTP 1.1.1 Released

2004-06-03 Thread Frank M. Kromann
mssql_field_type() is the function for that. - Frank > Robert, > > Do you have an example of pulling the Column types from an MS Sql query? For example: select top 1 * from mytablename. > > loop thru the fields in the recordset and print out their data types? > > > -- > Gerardo S. Rojas > ma

Re: [PHP-DB] Re: SQL Server Query Failed

2004-03-18 Thread Frank M. Kromann
Hi David, You problem might be a thread safty issue. the MSSQL extension is not thread safe (caused by the Microsoft Library used to create the extension). Use CGI or FastCGI to avoid this problem. - Frank P.S. I don't have the full thread of this discussion so I might miss some important inform

Re: [PHP-DB] Accessing MS SQL from Linux

2004-03-12 Thread Frank M. Kromann
You need one ofe the folowing extensions compied as a shared or static module: ODBC (UnixODBC) MSSQL (FreeTDS) ODBTP compiling as a shered module does not require recompile of PHP. You just need to load the extension with dl() or from php.ini. - Frank > > My domain is hosting through a hosting

Re: [PHP-DB] MS-SQL server connection

2004-03-08 Thread Frank M. Kromann
Hi Rafi, You need to install (and configure) the SQL Server Client tools. The important part here is the 'Client Network Utility' where you create aliases for host names, protocols and other options. The default setting for both the SQL server and the client is (in most cases) to use named pipes

RE: [PHP-DB] MS SQL 'Changed database context' error

2004-02-21 Thread Frank M. Kromann
The MSSQL standard mssql extension handles the 'Changed database context' message correct. Each query send to the SQL server results in some form of message returned. This can be either an error message or an information message. The MSSQL extension uses two ini settings to tell PHP how to handle

RE: [PHP-DB] MS SQL 'Changed database context' error

2004-02-19 Thread Frank M. Kromann
You are getting a message from the SQL Server. If you increase the values of mssql.min_error_severity and mssql.min_message_severity (default is 10) you will get more messages if you descrease the value you will get less messages. - Frank > Adam, Thanks for the suggestions. I don't want to i

Re: [PHP-DB] PHP and php_mssql.dll

2004-02-15 Thread Frank M. Kromann
You need to install the MSSQL Client Tools or alt least copy ntwdblib.dll from the SQL Server (this will allow connections but not configuration). - Frank > I have the php_mssql.dll in the extension directory but when I execute a > PHP page, I am told that the dll does not exist. This is on W

RE: [PHP-DB] PHP Standalone? (fwd)

2004-02-05 Thread Frank M. Kromann
an advantage (unless > you want to use mod_perl), but in a standalone environment i think that > perl will serve you better. > > > > > -- Forwarded Message -- > Date: Thursday, February 05, 2004 04:19:56 PM -0800 > From: "Frank M. Kromann" &

Re: [PHP-DB] PHP Standalone?

2004-02-05 Thread Frank M. Kromann
http://gtk.php.net - Frank > Hi there everyone, > > > > I need to produce a system which uses databases but NOT on a webserver, I > heard something about a PHP distro that is being developed which acts like > an executable, does anyone know anything of this? > > > > Any help would really

Re: [PHP-DB] MSSQL stability problem

2004-01-24 Thread Frank M. Kromann
I'm guessing that you are using PHP as ISAPI or Apache module and that might not always work with the MSSQL extension. The library (ntwdblib.dll from Microsoft) used for this extension is not thread safe. If you switch to CGI or FastCGI you will not have these problems. - Frank > Stuart wrote: >

Re: [PHP-DB] Creating temp tables in MSSQL

2003-12-19 Thread Frank M. Kromann
gt; Thanks, > Matt > On Tue, 2003-12-16 at 17:29, Frank M. Kromann wrote: > > > Hi, > > > > Any table that starts with # is a temp table. You can use > > > > create table #mytemp (...) or you should be able to use the query you > > suggest. You just

Re: [PHP-DB] Creating temp tables in MSSQL

2003-12-19 Thread Frank M. Kromann
at I understand no special rights are > needed to create a temporary table. > > Using mssql_get_last_message() gives me the message:Changed database > context to 'thedatabasenameisprintedhere'. > > What the heck is going on here? > > > > > > Fra

Re: [PHP-DB] Creating temp tables in MSSQL

2003-12-16 Thread Frank M. Kromann
Hi, Any table that starts with # is a temp table. You can use create table #mytemp (...) or you should be able to use the query you suggest. You just have to make sure you have enough space in tempdb (a system database) - Frank > Hi all, > > I've been handed a query which I'm trying to get to

Re: [PHP-DB] How To Recompile For FreeTDS + MS SQL Support?

2003-11-21 Thread Frank M. Kromann
Hi, When you have the PHP sources extracted from the tar-ball you can use configure --with-mssql,shared make Then you can copy the mssql.so file to your current php installations extension dir and either load the extension form php.ini or with the dl() function. This way tou don't have to recom

Re: [PHP-DB] Linux/PHP with M$/SQL Server

2003-11-20 Thread Frank M. Kromann
Hi, It is also described in the documentation at http://php.net/mssql. - Frank > Thanks Jeff, I'll look into FreeTDS. > > Matt > > [EMAIL PROTECTED] wrote: > > >you can use freetds (http://freetds.org) i think there is even an rpm... > >Then you just use the mssql_* functions built into php

Re: [PHP-DB] SQL Server Connect Issues

2003-11-03 Thread Frank M. Kromann
Hi Tom, What you need to get the instalation to work is these: php.exe (CGI version) php4ts.dll php_mssql.dll php.ini in the same directory. I know you can make many different combinations of files and directories but this minimum will work. You can aslo also add php4isapi.dll if you want to use

Re: [PHP-DB] Problems with Sybase and MSSQL

2003-10-08 Thread Frank M. Kromann
The problem is the Sybase extension. It defines some mssql_* functions, and these will conflict with the mssql_* functions defined by the MSSQL extension. You can either use the Sybase extension alone and use both Sybase_* and mssql_* functions, but then there will be no support for the special ms

Re: [PHP-DB] MSSQL2000 and PHP

2003-09-04 Thread Frank M. Kromann
Hi, When the MSSQL extension is used on *nix systems (compile PHP using --with-mssql) you can actually fetch char/varchar columns up to 8000 bytes. UNICODE data is supported, though I have not thested nchar, nvarchar and ntext yet. The MSSQL extension also includes support for storred procedures

Re: [PHP-DB] php_mssql.dll

2003-06-15 Thread Frank M. Kromann
Hi, This is caused by missing dll's. You need to install the client tools from MSSQL Server on your PHP box. You can also copy ntwdblib.dll from winnt\system32 on the SQL Server to the same directory on the PHP box. If you want to be able to create custome configurations of the client you need to

Re: [PHP-DB] MSSQL Procedures

2003-06-14 Thread Frank M. Kromann
Hi, The easy way is to use the mssql functions in PHP. You can see how to configure PHP with these in the online manual: http://www.php.net/mssql. You need to download and install FreeTDS (http://freetds.org). You can also use the online manual to get samples on how to execute stored procedures a

Re: [PHP-DB] MSSQL Optimize?

2003-06-04 Thread Frank M. Kromann
Mssql server has a list of tools you can use for this. When you create the database (or later modify it through Enterprice Manager) you can specify 'Auto Shrink'. This will make sure the file sise is optimized when you delete data. This cal also be done with this call: sp_dboption('database', 'au

Re: [PHP-DB] strip

2003-06-04 Thread Frank M. Kromann
That depends on your backend. Some database systems uses \ to escape ' others uses '. In the last case use $value = str_replace("'", "''", $value); - Frank > Don't. addslashes() instead. > > Chris Mach wrote: > > >does anyone know how to strip a ' from a string? It's causing errors for my >

Re: [PHP-DB] mssql_query & ROLLBACK

2003-03-24 Thread Frank M. Kromann
Hi, You can't split a transaction between multiple calls to mssql_query. The memory used (in the server and client) are cleared between each call. You would have to create a batch of statements and execute these with one call to mssql_query. - Frank > I have an opened connection to MS SQL Serve

Re: [PHP-DB] PHP 4.3.0 + MSSQL database authenticationproblem?

2003-02-12 Thread Frank M. Kromann
rank > Hi Frank, > > --- "Frank M. Kromann" <[EMAIL PROTECTED]> wrote: > > This should be ok. --with-tdsver=4.2 sets the > > default. > > I figured as much, since I think the default can be > overridden in the 'freetds.conf' and/or $TDSVER &

Re: [PHP-DB] PHP 4.3.0 + MSSQL database authenticationproblem?

2003-02-11 Thread Frank M. Kromann
t; Hi Frank, > > --- "Frank M. Kromann" <[EMAIL PROTECTED]> wrote: > > I'm not sure what 'Control Panel PHP script' means ? > > I meant the PHP page itself that is the Control Panel > (i.e., 's_controlpanel.php') > > > What versi

Re: [PHP-DB] for xml auto from MS Sql Server

2003-02-11 Thread Frank M. Kromann
Hi, selectting XML data forces the result to be returned a a unicode text field. That is not suported by the DBLIB library (From Microsoft) used to build the mssql extension does not support that. You can use ODBC or you can wait untill I have a working compy of FreeTDS on Win32. FreeTDS is devel

Re: [PHP-DB] PHP 4.3.0 + MSSQL database authenticationproblem?

2003-02-11 Thread Frank M. Kromann
Hi Alan, I'm not sure what 'Control Panel PHP script' means ? What version of FreeTDS are you using ? Do you use the sybase or the mssql extension in PHP ? - Frank > Hello, > > Because I am not sure if this is just a PHP issue or a > PHP+DB issue, I will be posting this message > (seperately)

Re: [PHP-DB] DB_FETCHMODE_ASSOC result differs forMySQL and MS-SQL

2003-01-21 Thread Frank M. Kromann
Hi Gunther, there was an error in the mssql.php file. I have just fixed that in cvs. Change line 161 from $ar = @mssql_fetch_array($result); to $ar = @mssql_fetch_array($result, MSSQL_ASSOC); And it will work on your system - Frank > I have a problem with PHP 4.3.

Re: [PHP-DB] Re: undefined function: mssql_connect()

2003-01-08 Thread Frank M. Kromann
Hi, php_mssql.dll is for win32 only. This seams to be a *nix installation. In order to use the MSSQL functions yoy will need to compile PHP using --with-mssql (or if your PHP version is < 4.3.0 --with-sybase). In both cases you also need to download, compile and install FreeTDS (www.freetds.org).

Re: [PHP-DB] undefined function: mssql_connect()

2003-01-06 Thread Frank M. Kromann
Hi With PHP 4.3.0 you can use --with-mssql (it looks for freetds in /usr/local/freetds by default). Then you can use the mssql.* settings in php.ini. When you compile using --with-sybase you would have to use the sybase.* settings in php.ini, as that is the extension you would be using. You shoul

Re: [PHP-DB] Re: php and db/c

2003-01-03 Thread Frank M. Kromann
According to the specs for ODBC (and SQL92) it is ok to return -1 for the number of rows, as the correct number might not be available until the last row has been fetched. - Frank > [EMAIL PROTECTED] wrote: > > Hello everyone, > > We are running an old database system called db/c and attempti

Re: [PHP-DB] how to call a stored procedure in SQLServer 2000

2002-12-26 Thread Frank M. Kromann
Take a look at the documentation: http://www.php.net/manual/en/function.mssql-execute.php - Frank > Hi gurus, > > I am new user to PHP. > > Does anyone here work with SQL server with PHP, please show me some codes about how to call a stored procedure in a SQL Server Database. > > how to add

RE: [PHP-DB] email form

2002-12-10 Thread Frank M. Kromann
Hi, When you use single quotes to define your strings php variables will not be replaced. Try $message = "...$customer.."; You will have to escape all double quotes used in the string (\") or use single quote. - Frank > This is where I am stuck, I can not get the variables to be placed in to

Re: [PHP-DB] MSSQL Problems

2002-12-05 Thread Frank M. Kromann
Take a look at the documentation at http://www.php.net/manual/en/function.mssql-close.php whhere it says "mssql_close() will not close persistent links generated by mssql_pconnect()". connections created by mssql_pconnect() will only be closed when the PHP process terminates. - Frank > I've writ

Re: [PHP-DB] Function that outputs "at line xxx"

2002-10-26 Thread Frank M. Kromann
Hi, A new function 'debug_backtrace()' will be available in PHP 4.3.0. This function will print a list of all the functions called. - Frank > Yeah, I understand what your asking. I don't know of any method to get the > line number a function was called on, from within the function. > > You may

RE: [PHP-DB] PHP and MS-SQL

2002-10-26 Thread Frank M. Kromann
Hi, It is true that FreeTDS works with MS SQL Server, but I think you need a bit more info: Sybase and MS SQL Server used to be the same product back when 4.x was released. Then Microsoft released 6.0 including a set of C libraries and everything was fine. Microsoft has not released new version

Re: RE: [PHP-DB] Text Field in SQL Server

2002-05-15 Thread Frank M. Kromann
You can actually control this on the fly. odbc_binmode($iRecordSet, 2); odbc_longreadlen($iRecordSet, 4096); $str = ""; while ($temp = odbc_result($iRecordSet, "COLUMN_NAME")) $str .= $temp; This will set the block size to 4k and when you fetch data until the entire column has ben fetc

[PHP-DB] Re: Maximum field length with PHP 4.1.2/MSSQL v7 ?

2002-05-07 Thread Frank M. Kromann
e the max > data-length returned by a field on the fly, so there must be some > settings, or the Query Analyzer doesen't use this db-lib, > > bye, > > Chris Mackenzie wrote: > > >"Frank M. Kromann" wrote: > > > >Many thanks Frank, changing f

Re: [PHP-DB] Connect to IBM DB2

2002-01-02 Thread Frank M. Kromann
Hi, IBM DB/2 uses Call Level Interface (CLI) for communication between clients and server. The ODBC driver from IBM is a simple one to one wrapper arround CLI, as CLI and ODBC share the same specifications. Using ODBC will give you an extra layer though. On *nix platforms you can compile usen

Re: [PHP-DB] MSSQL DB Connect

2001-12-21 Thread Frank M. Kromann
Hi Jerry, You need to have the Client Tools for MS SQL Server installed on your PHP4 box. These tools is found on the CD, or you can just copy ntwdblib.dll fom one system to another. The default communication protocol will be netbios, if you want to change that to tcp/ip you need to install th

Re: [PHP-DB] How to install gdlibrary on windows 2000?

2001-11-30 Thread Frank M. Kromann
You can download binaries (from latest cvs) from http://kromann.info/php4.php I'm not compiling all binaries at this point, but this page is updated every morning at 4am. If you want to compile it your self you need MS Visual C++, some libraries (gd, jpeg, png, ttf etc.) some patients. - Fran

Re: RE: [PHP-DB] Windows, MSSQL varchar>255 caracters?

2001-11-12 Thread Frank M. Kromann
The "bug" as you call it is a limitation in the libraries from Microsoft. SQL Server ships with a set of C-Libraries called DBLIB, and these were developed for MSSQL Server 4.x and 6.x. In version 7.x Microsoft extended char and varchar column max length to 8000 but did not update the DBLIB stu

Re: [PHP-DB] counting categories

2001-10-28 Thread Frank M. Kromann
Hi, Depending on the database you are selecting from you could do it in one select like this: select category, count(*) from $table group by category order by category; - Frank > How would you get the count of each category? > > Like this - http://www.scriptsearch.com > > Would you have to

Re: [PHP-DB] datetime in MSSQL7

2001-10-23 Thread Frank M. Kromann
This problem has just been fixed in CVS. - Frank > Hello! > > How can I force PHP to fetch datetime field i 'mmdd hh:mm:ss' WITHOUT > using MSSQL query like *SELECT convert(varchar,dtfield,20) as 'dtfield'* and > so on? > I have a few tables on MSSQL with the different structures and som

Re: [PHP-DB] MS SQL 7

2001-10-04 Thread Frank M. Kromann
If your storred procedure returns a result set you can get it with the mssql_functions as well. If the precedure returns values or output parameters you will need php 4.0.7 (or current cvs). The updated version of php_mssql.dll includes three new functions aimed for storred procedures. - Fran

Re: [PHP-DB] Driver for connecting SQL server

2001-10-01 Thread Frank M. Kromann
Hi Try to remobe 'DNS=' from the connect $conn=odbc_connect("dnsname","userid","password"); should do the trick. - Frank > Hi: > > I'm trying to establish a connection with SQL 7.0. > > My system runs W2000, Apache, PHP4. I created a DNS odbc file (with MS > Access) and checked that the

Re: [PHP-DB] Installing SQL Server

2001-09-05 Thread Frank M. Kromann
Yes, I have. I think I got the ODBC driver from MDAC 2.6 (available from www.microsoft.com/data), but you will also get it by installing other Microsoft products (Access or Office). Depending on the version of SQL Server you use you can get improved performence by ysing the native MSSQL extens

Re: [PHP-DB] Can't connect to MS SQL

2001-07-30 Thread Frank M. Kromann
Hi Adam, Host name should not include the port number. If you need to use a non standard port number you should create a client configuration (using client network utility) and then use the name of the configuration as the host name. - Frank > I have PHP running on Apache for win32. The mssq

Re: [PHP-DB] Re: A question about MSSQL! Help!!

2001-07-18 Thread Frank M. Kromann
Hi All, Microsoft SQL Server used to be identical with Sybase (back arround version 4.xx). This makes it possible to use the sybase extension (using FreeTDS) on a *nix box to talk to a SQL Server on a NT/2000 box. Due to product development SQL 2000's db-library is no longer 100% compatible. Th

Re: [PHP-DB] PHP4-ODBC-MSSQL7

2001-07-10 Thread Frank M. Kromann
Hi Michael, The should not be any issues with the oder of the columns in the select using ODBC. I do have some questions for you. 1) What is the reson for using stored procedures for this. The procedure you are showing is just a wrapper arround a SQL statement. You could as easily generate the

Re: [PHP-DB] a simple question

2001-07-09 Thread Frank M. Kromann
Hi Brad, Your parameter is named $title and you are converting a variable called $input to an array. You could catch this type of errors if you change the setting for error_reportiong in php.ini. - Frank > can somebody help me with the following code: > > > function multi_word($title) { >

Re: [PHP-DB] testing ODBC + MSSQL connection locally

2001-07-09 Thread Frank M. Kromann
Hi, > I would like to begin learning ODBC. Will I be able to set this up on my > single local machine? The ODBC functions are build in when you are running PHP on a Windows Box. If you are running on a (nix box you have to compile PHP with support for ODBC. > Also, What about connecting to MS

Re: [PHP-DB] PHP MSSQL, IIS Question -- Size Question

2001-07-06 Thread Frank M. Kromann
What version of php are you using ? Handling of binary data from MSSQL Server was changed from php4.0.5 to php4.0.6. As far as I can tell You should not have any problems with php4.0.6 - Frank > I am preparing a report for a database at my company that will be shown on > the web. It has sev

Re: [PHP-DB] sybase_query()

2001-07-03 Thread Frank M. Kromann
Hi, I would suggest removing @ in front of the sybase_query. This way your code will produce warnings and messages from the server. That could help you debugging. You could also try to execute the query in Query Analyzer on the SQL Server. - Frank > Please take a look into my simple php code.

Re: [PHP-DB] sybase function for MS-SQL Server

2001-06-30 Thread Frank M. Kromann
Hi, > Query Analyzer" perfectly. > e.g. > SP1: (works) > CREATE PROCEDURE SP1 AS > insert into mytable values(...) > select * from mytable Only one result set. > > SP2: (doesn't work) > CREATE PROCEDURE SP2 AS > select * from mytable > select * from mytable Two result sets > > SP3: (

Re: [PHP-DB] mssql_xxx() and characters

2001-06-29 Thread Frank M. Kromann
Hi, You will need to configure the character translation in the Client tools. Open Cleint Network Utility (on the web server running php) and select the "DB Library Options" tab. There you can enable and disable Automatic ANSI to OEM convertion. If you are using the ISAPI version of php you wi

Re: [PHP-DB] MSSQL limit capability

2001-06-20 Thread Frank M. Kromann
MSSQL does not have complete the same functions. You can use SELECT TOP 10. You could also define mssql.batchsize in php.ini. This way php only reads the specified number of rows. You can the use mssql_fetch_batch() to read batches of data on the same query. - Frank > Hi, > > Having used to

Re: [PHP-DB] mssql 2000

2001-04-23 Thread Frank M. Kromann
The MSSQL extension works fine with SQL Server 6.5, 7.0 and 2000. What type of errors are you getting ? - Frank > Why the mssql_connect don't function with mssql server 2000 ? > > Bye > Gian Luca > > > > -- > PHP Database Mailing List (http://www.php.net/) > To unsubscribe, e-mail: [EMAIL

Re: [PHP-DB] What PHP4 use for connection to MSSQL?

2001-04-17 Thread Frank M. Kromann
ODBC and ADO uses the same type of connection. In fact you need an ODBC DSN to connect to a database using ADO. The MSSQL functions in PHP uses a native communication with the database. This communications is faster than using ODBC but it is not as easy moving to other databases as it would be

Re: [PHP-DB] Display data begin with "A"

2001-04-07 Thread Frank M. Kromann
wyoy could use a SQL statement like this: select * from myTable where LastName like "A%" - Frank > Guys, > > How to view the result from the table. > If I only want to display persons begin with letter A in the front. > > > > _ > w