[PHP-DB] mssql_fetch_array not working?

2002-05-13 Thread Benjamin Walling
I apologize if the answer to this is incredibly simple. I'm trying to learn PHP, and evaluate whether to change our site away from ASP. I have the following php code, and I can't get any results. I have add the line echo mssql_num_rows($rs); to see how many rows are returned, and I get 11

[PHP-DB] I'm running...

2002-05-13 Thread Benjamin Walling
It might help to tell you: Windows 2000 Server (SP2) IIS 5 PHP 4.21 -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DB] mssql_fetch_array not working?

2002-05-13 Thread Benjamin Walling
Original Message- From: Benjamin Walling [mailto:[EMAIL PROTECTED]] Sent: Monday, May 13, 2002 5:16 PM To: [EMAIL PROTECTED] Subject: [PHP-DB] mssql_fetch_array not working? I apologize if the answer to this is incredibly simple. I'm trying to learn PHP, and evaluate whether to change

Re: [PHP-DB] mssql_fetch_array not working?

2002-05-13 Thread Benjamin Walling
internet and open source software --- Sunmaia www.sunmaia.net [EMAIL PROTECTED] tel. 0121-242-1473 --- -Original Message- From: Benjamin Walling [mailto:[EMAIL PROTECTED]] Sent: 13 May 20

Re: [PHP-DB] mssql_fetch_array not working?

2002-05-13 Thread Benjamin Walling
I thought about that while I was copying the code from the tutorial. I know a little C++, and it seemed wrong, but I let it go. Thanks. Terry Romine [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... Do I see a semicolon at the end of the while? that won't

[PHP-DB] MSSQL DateTime field formatting?

2002-05-14 Thread Benjamin Walling
I can't seem to find a way to format the field that comes back from my DateTime fields in MSSQL Server. For example, '2002-05-13' shows in Query Analyzer as 2002-05-13 00:00:00.000. If I echo it from PHP, I get May 13 2002 12:00AM. date() won't take it. strftime() won't take it. What do I

Re: [PHP-DB] Anti-virus alarm! Sulfbnk var inget virus.

2002-05-16 Thread Benjamin Walling
It's been a long time since I heard this one. Damn marketing guy at work forwarded a similar email to the entire company, telling them to delete the file sulfnbk.exe one day when I was out. Thing was supposedly 'dormant until June 1st, 2001' and then the whole company was going to get screwed.

Re: [PHP-DB] Re: Question about ODBC databases

2002-05-21 Thread Benjamin Walling
Write a simple web service. Put a few PHP pages on the NT server, which take parameters, and return results. For example, create a function that takes a string (sql statement, eg) as a parameter, and echos a comma delimited page (the resulting recordset). Then, on the Linux/Unix box, use the

[PHP-DB] Re: REGEXP for search engine/SQL Server

2002-05-21 Thread Benjamin Walling
Why not yank the quoted terms out before using split? Search for patterns .* and put them in a separate array. Once those are gone, split the remaining string. You may want to remove duplicate spaces created by removing the quoted terms. Kevin Won [EMAIL PROTECTED] wrote in message [EMAIL

[PHP-DB] Re: Complicated query on very simple database - pointers sought

2002-05-22 Thread Benjamin Walling
Look into Aggregate Functions. They can let you do the things that you are looking for. SELECT Month(OrderDate) as 'Month', Count(DISTINCT Customer) as 'NumCustomersOrdering', Count(Customer) as 'TotalOrders' FROM tbl_Orders GROUP BY Month(OrderDate) will give you a list of months, and the

[PHP-DB] Re: PHP Mysql Select Distinct problem

2002-05-22 Thread Benjamin Walling
MessageAccording to http://www.mysql.com/doc/D/I/DISTINCT_optimisation.html, DISTINCT is converted to a GROUP BY on all columns, DISTINCT combined with ORDER BY will in many cases also need a temporary table. Instead of using DISTINCT, consider adding GROUP BY for all the columns except ID.

[PHP-DB] mssql_init using freetds

2002-08-20 Thread Benjamin Walling
I've installed freetds 0.53, php 4.2.2 and apache 1.3.26. I have some of the mssql functions working (mssql_connect(), for example). I cannot get mssql_init() to work - I get Fatal error: Call to undefined function: mssql_init() in /var/www/html/stdFunctions.php on line 128 I saw a previous

[PHP-DB] Re: Real Killer App!

2003-03-12 Thread Benjamin Walling
Are you doing some kind of recursion and getting stuck or overflowing the stack? If you create something like: function Factorial($x) { if ($x == 1) { return $x; } else { return $x * Factorial($x-1); } } You can get into a problem with overflowing the call stack with a sufficiently