[PHP-DB] PHP4 on Windows & using MSSQL

2003-02-23 Thread Kevin Gordon
Hi Everyone,

>From a Linux session:
~ # telnet 10.1.1.1 1433
Trying 10.1.1.1...
Connected to 10.1.1.1.
Escape character is '^]'.
Connection closed by foreign host.

>From within NT4 Primary Domain Server:
SQL Server Query Analyzer using the user login & password applied in PHP
(and created in MSSQL) Queries processed ok.

In PHP must I use NT authenticated login / password?

Both a PHP client on Linux and Windows receive the same error message:
Warning: SQL error: [Microsoft][ODBC SQL Server Driver][Named
Pipes]Specified SQL server not found., SQL state 08001 in SQLConnect in
E:\Inetpub\wwwroot\php\ODBC_Driver.php on line 174

The PHP.ini file on NT4 has:
**
[MSSQL]
; Allow or prevent persistent links.
mssql.allow_persistent = On

; Maximum number of persistent links.  -1 means no limit.
mssql.max_persistent = -1

; Maximum number of links (persistent+non persistent).  -1 means no
limit.
mssql.max_links = -1

; Minimum error severity to display.
mssql.min_error_severity = 10

; Minimum message severity to display.
mssql.min_message_severity = 10

; Compatability mode with old versions of PHP 3.0.
mssql.compatability_mode = Off

; Valid range 0 - 2147483647.  Default = 4096.
;mssql.textlimit = 4096

; Valid range 0 - 2147483647.  Default = 4096.
;mssql.textsize = 4096

; Limits the number of records in each batch.  0 = all records in one
batch.
;mssql.batchsize = 0

; Use NT authentication when connecting to the server
mssql.secure_connection = Off

; Specify max number of processes. Default = 25
;mssql.max_procs = 25


ntwdblib.dll is in the correct Windows directory.

Using a System DNS for ODBC. Should I be using a File DNS?

Can I open up NT4 PDS to telenet to it?

Any thoughts, comments?
Many thanks,

Kevin Gordon
New Zealand


-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP-DB] mysql to cvs file to excel

2003-02-23 Thread Ruth Zhai
This is what I use to generate a comma delimited csv file:

   $sql = "SELECT * FROM table INTO OUTFILE 'file.csv'"
 ." FIELDS TERMINATED BY \',\'"
 ." ENCLOSED BY \'\"\'";

Hope this helps.

Ruth


 
- Original Message - 
From: "Snijders, Mark" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, February 21, 2003 8:59 PM
Subject: [PHP-DB] mysql to cvs file to excel


> hello,
> 
> does anybody know if it's possible (without php)
> 
> to export data from mysql to a cvs file, so i can import it in excel???
> 
> so is it possible, and if yes.. how?
> 
> thanks kinds regards,
> 
> Mark Snijders
> 
> 
> 
> 
> 
> -- 
> PHP Database Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 
> 



-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP-DB] Difficult Dilemma Details Dodged

2003-02-23 Thread John W. Holmes
> We have constructed a reservation system for a chain of travel agents.
Our
> former PHP'er wrote the booking section but it appears to be very
fragile,
> as it breaks regularly. We are now rewriting this section.
> 
> Our problem. page 1 is a form to fill in up to 4 names so as to search
the
> database (MySql client table) and if there shows the details on page
2. If
> names (some or all) are not there we need to be able to click modify
and
> either modify information or add new client.
> 
> This we have now, our problem is getting the modified/new information
to
> move a long and redisplay page 2 with all the modified/new info. Can
> anyone
> suggest a method

Not sure if I follow everything completely, but I'd like to help. If you
have the data on page two and want to "resubmit" it, then you need to
add it to another form and submit and process it. 

---John W. Holmes...

PHP Architect - A monthly magazine for PHP Professionals. Get your copy
today. http://www.phparch.com/



-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP-DB] SQL server procedore how to

2003-02-23 Thread Mark
You need to ue mssql_fetch_*() to actually put the data into an
array.

--- Noam Giladi <[EMAIL PROTECTED]> wrote:
> i have a aprocedure "simple_proc"
> i try to call her with  mssql_query like this:
> 
> 
> $q="exec simple_proc";
>  $ret = mssql_query($q,$__["db connection"]);
>  
> 
> the result i get is:
> 
> ---
> Resource id #20
> --
> insted of getting the resulets the proc is returning
> what should i do??
> tnx noam.
> 
> by the way ,if i use the sql server "Query Analyzer", i'm getting
> the wanted
> results
> 
> 
> 
> 
> -- 
> PHP Database Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 


=
Mark Weinstock
[EMAIL PROTECTED]
***
You can't demand something as a "right" unless you are willing to fight to death to 
defend everyone else's right to the same thing.
***

__
Do you Yahoo!?
Yahoo! Tax Center - forms, calculators, tips, more
http://taxes.yahoo.com/

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-DB] Difficult Dilemma Details Dodged

2003-02-23 Thread Kevin P
Greetings All;

We have constructed a reservation system for a chain of travel agents. Our
former PHP'er wrote the booking section but it appears to be very fragile,
as it breaks regularly. We are now rewriting this section.

Our problem. page 1 is a form to fill in up to 4 names so as to search the
database (MySql client table) and if there shows the details on page 2. If
names (some or all) are not there we need to be able to click modify and
either modify information or add new client.

This we have now, our problem is getting the modified/new information to
move a long and redisplay page 2 with all the modified/new info. Can anyone
suggest a method

Thanks

Kevin,



-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-DB] SQL server procedore how to

2003-02-23 Thread Noam Giladi
i have a aprocedure "simple_proc"
i try to call her with  mssql_query like this:


$q="exec simple_proc";
 $ret = mssql_query($q,$__["db connection"]);
 

the result i get is:

---
Resource id #20
--
insted of getting the resulets the proc is returning
what should i do??
tnx noam.

by the way ,if i use the sql server "Query Analyzer", i'm getting the wanted
results




-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php