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

2003-12-17 Thread John Krewson
Thanks for your response Frank, but this is still driving me nuts and making me look like a moron at the same time (-: This simplified query: $query = "SELECT distinct convert(varchar(36),a.traineeID) INTO #tempdata1"; $query .=" FROM tblSignIn_trainee a"; $queryresult = MSSQL_QUERY($query,$cn) o

[PHP-DB] Creating temp tables in MSSQL

2003-12-16 Thread John Krewson
Hi all, I've been handed a query which I'm trying to get to work. I'm using PHP to talk to MSSQL 7. My question is this: Can I create temp tables with mssql without executing the code in a stored procedure? The simplified version of the query is as follows: $query = "SELECT distinct convert

Re: [PHP-DB] "Fake" BDD

2003-12-02 Thread John Krewson
Perhaps this is what you were referring to? http://www.c-worker.ch/txtdbapi/index_eng.php Then there is SQLite, http://php.net/manual/en/ref.sqlite.php. I've seen several tutorials out there regarding using SQLite, and it will probably become quite popular after PHP 5+ becomes everyone's favorit

Re: [PHP-DB] Extracting values from an array (I think)

2003-11-24 Thread John Krewson
If you have to assign 24 unique variables rather than storing this data in an array, then you could apply some variable variable action. Here is a code sample that assumes you are looping through a result set from a database: query ="SELECT short_label FROM config ORDER BY meter_num"; $re

Re: [PHP-DB] "LIMIT" problem MSSQL

2003-02-19 Thread John Krewson
nt page numbering system which knows which rows it should pull (at least by numbering each row numerically) but I don't know how to construct a SQL query to pull 10 results starting at a certain number. please did anyone wrote a proc that do it?. -- John Krewson Programmer - SWORPS

Re: [PHP-DB] Date format in MySQL

2003-02-03 Thread John Krewson
. The date will not necessarily be todays date (I looked at the datetime() function and the getdate() function but couldn't work it out for these) Thanks for your support All the best Lisa Lisa Rubanowicz CNH Ireland Tel: +353 46 77663 Email: <mailto:[EMAIL PROTECTED]> [EMAIL PRO

Re: [PHP-DB] what does % mean?

2003-01-31 Thread John Krewson
someone else. In it there is a query: $query = "select description from $prodtable where description like '%' or type like '%' group by description"; I've seen it used as mathematical modulos, but not sure how it's used here. Thx -- John Krewson Progr

Re: [PHP-DB] MySQL Error

2003-01-28 Thread John Krewson
("Connected successfully"); mysql_close($link); The scripts outputs: Warning: Can't create TCP/IP socket (10106) in C:\Projects\WebServer\admin.php on line 3 Warning: MySQL Connection Failed: Can't create TCP/IP socket (10106) in C:\Projects\WebServer\admin.php on line 3 Could

Re: [PHP-DB] too many connections?

2003-01-27 Thread John Krewson
line 5 -- John Krewson Programmer - SWORPS -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DB] using Flat File

2003-01-22 Thread John Krewson
} > >} > >if ( ! $auth ) { > >header( 'WWW-Authenticate: Basic realm="Private"' ); >header( 'HTTP/1.0 401 Unauthorized' ); >echo 'Authorization Required.'; >exit; > >} else { > >echo ' You are authorized! '; >} > >?> > > - Do you Yahoo!? Yahoo! Mail Plus - Powerful. Affordable. Sign up now -- John Krewson Programmer - SWORPS -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DB] Mail() and replies

2003-01-15 Thread John Krewson
rey Baumgartner eBusiness Consultant - ITP Europe http://www.itp-europe.com [EMAIL PROTECTED] +32 2 721 51 00 -- John Krewson Programmer - SWORPS -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DB] Linux+php+remote MS SQL

2002-12-13 Thread John Krewson
We are currently running two report generation applications where PHP is running on Linux machines and queries data from Windows NT servers running MSSQL 7.0 We have reports that deal with millions of records, and whether they run for 4 minutes or 20, I have only seen robust results from the PH

Re: [PHP-DB] HELP!! Warning: mysql_pconnect:

2002-12-13 Thread John Krewson
Try mysql_connect instead. Doesn't sound as if you are at the stage at which you would realize any gains from a persistent connection. I've just seen a lot of comments regarding strange happenings with pconnect - which I have no doubt will be addressed later. Don Briggs wrote: While viewin

Re: [PHP-DB] MSSQL Problems

2002-12-05 Thread John Krewson
mssql_pconnect cannot be closed as you mentioned: http://www.php.he.net/manual/en/function.mssql-pconnect.php I am using this as well, calling MSSQL on a Windows box from PHP/Apache on Linux, and I am also getting some of the results you mentioned, although it behaves differently at different ti

Re: [PHP-DB] Re: Get Last ID Inserted

2002-11-21 Thread John Krewson
Please don't ban more for this example using VB, but this is how I did it a while ago in VB/ASP, generating and setting the RecID in one stroke. I assume you could just wrap this in PHP and it would work just as well. strSQL="Select newid()" RecID = objConn.Execute(strSQL)(0).val

Re: [PHP-DB] Fastest, easiest Flatfile DB with PHP

2002-11-18 Thread John Krewson
ll be needed, such as per date entered, age, etc. |> John Krewson <| |> 865-974-3263 <| |> [EMAIL PROTECTED]<| |>Senior Programmer/Analyst <| Social Work

Re: [PHP-DB] Best reporting Tool

2002-11-14 Thread John KRewson
I have recently been creating reports using PHP's pdf libraries. Somewhat time consuming to develop them from scratch and the client has to have the acrobat reader, but they look slick, I must say. Another option is to create RTF or PDF templates and simply replace certain areas with your dat