[PHP-DB] MySQL query question

2004-02-13 Thread js
i want to search the table called comments, and i want to count the number of times artid appears. then i want to group them all together, but then i want to order them by most appearances to fewest. so if artid 1 appeared 40 times and it was the most, i want that to be retrieved first. if

Re: [PHP-DB] Optimize Table

2004-02-13 Thread Ricardo Lopes
For the overhead i can't tell you anything, probably you will have something in the mysql manual. About the locking i supose that your users will be able to select from the table, but wont be able to do updates, etc.. while the optimization ocurrs. The database will probably put those instruction

Re: [PHP-DB] Optimize Table

2004-02-13 Thread Ricardo Lopes
sorry i have a great error in my last post, when i say: PhpmyAdmin or any other php script can be scheduled, i mean: PhpmyAdmin or any other php script _CAN_ _NOT_ be scheduled, it happends. - Original Message - From: Ricardo Lopes [EMAIL PROTECTED] To: Ng Hwee Hwee [EMAIL PROTECTED]

[PHP-DB] Problem with SQL Server.

2004-02-13 Thread Juan Torres
Hello, I'm working with a DB SQL Server. This DB has a table with Japanese characters. When I read a field (with Japanese characters) with function mssql_fetch_array(), always it return characters '?'. If I put 'print((Japanese characters));', these Japanese characters are shown correctly. My

[PHP-DB] ODBC with SQL Server

2004-02-13 Thread Juan Torres
Hello, I have a connectoin ODBC with a SQL Server database. A table has a field of type 'nvarchar'. This field contains japanese characters. How can I read these japanese characteres? When I read (with: select name from data) only read '?' character. Thaks very much. Juan Torres. -- PHP

[PHP-DB] Japanese characters.

2004-02-13 Thread Juan Torres
How can I read from a SQL Server DB, a field of type 'nvarchar'. This field contais japanese characters. thanks! -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP-DB] Re: Subject: MySQL query question

2004-02-13 Thread Neil Smith [MVP, Digital media]
I think you just have to 'alias' the result count, so that ORDER BY knows what to use to do the ordering - it needs a column name, but an alias is equivalent to a column name. So : $mostcomquery = SELECT artid, COUNT(*) AS hitcount FROM comments

Re: [PHP-DB] ODBC with SQL Server

2004-02-13 Thread Robert Twitty
You cannot use the odbc mssql extensions to read nvarchar ntext fields. You will have to use the odbtp extension located at http://odbtp.sourceforge.net. It provides support for UNICODE data. -- bob On Fri, 13 Feb 2004, Juan Torres wrote: Hello, I have a connectoin ODBC with a SQL Server

Re: [PHP-DB] ODBTP 1.1 Released for MSSQL, Access, FoxPro ODBC

2004-02-13 Thread Robert Twitty
Hi Alain It is very safe. The ODBTP service has been running on a production machine that is also running SQL Server 2000. It has been running without failure since 12/15/2003, and has served over 1.5 million connections. A single ODBTP server is being used to connect to several MSSQL 6.5,

Re: [PHP-DB] Japanese characters.

2004-02-13 Thread Robert Twitty
Use the odbtp extension. It provides the best, easiest and maybe only support for SQL Server's UNICODE data fields within PHP. -- bob On Fri, 13 Feb 2004, Juan Torres wrote: How can I read from a SQL Server DB, a field of type 'nvarchar'. This field contais japanese characters. thanks!

[PHP-DB] Paging large recordsets

2004-02-13 Thread Karen Resplendo
I guess the time has come that my boss wants Next, Previous, First, Last paging for our data displays of large recordsets or datasets. Any good solutons out there already? I have pieces of a few examples. Also, how to deal with printing? I would assume that the ideal page size is not the

Re: [PHP-DB] Paging large recordsets

2004-02-13 Thread Peter Beckman
On Fri, 13 Feb 2004, Karen Resplendo wrote: I guess the time has come that my boss wants Next, Previous, First, Last paging for our data displays of large recordsets or datasets. First, do a query to find out how many rows. select count(*) from table where (your where clauses for the

Re: [PHP-DB] Paging large recordsets

2004-02-13 Thread Robert Twitty
Most of the PHP solutions I have seeen require the use of session variables. You could create an array containing only the unique identifiers of all the records, and then store it into a session variable. You would then use another session variable to retain the page size, and then include the

RE: [PHP-DB] Paging large recordsets

2004-02-13 Thread Hutchins, Richard
I know phpclasses.org has a few recordset paging classes out there for your convenience. Might want to try on a couple of those too just to see if they fit. Rich -Original Message- From: Robert Twitty [mailto:[EMAIL PROTECTED] Sent: Friday, February 13, 2004 1:34 PM To: Karen

RE: [PHP-DB] Paging large recordsets

2004-02-13 Thread Paul Miller
In no way I am trying start some long thread here. But I have always heard it was bad to store that much data in a session array? I could just be really off here and not understanding what I have read. I know PHP stores the sessions as text files. The only reason I can come up with why one

RE: [PHP-DB] Paging large recordsets

2004-02-13 Thread Peter Beckman
On Fri, 13 Feb 2004, Paul Miller wrote: I have always heard it was bad to store that much data in a session array? Can someone clarify this for me? IMO It is bad to store lots of data in session variables. The $_REQUEST var for the post/get should be enough. URL: search.php?page=10 code:

RE: [PHP-DB] Paging large recordsets

2004-02-13 Thread Robert Twitty
If you are not opearating in a stateless environment, then you could use a cursor. The web is a stateless environment, and therefore the record set needs to be cached either to disk or memeory. The other alternative is to rerun the query for each page request. Using disk space to store query

RE: [PHP-DB] Paging large recordsets

2004-02-13 Thread Paul Miller
One way that I have found - but never used is... http://sqlrelay.sourceforge.net/ It can cache result sets in a file for later use. You can then use It does a whole bunch of other stuff too. I really need to install this and start working with it. - Paul -Original Message- From:

RE: [PHP-DB] Paging large recordsets

2004-02-13 Thread Peter Beckman
On Fri, 13 Feb 2004, Robert Twitty wrote: If you are not opearating in a stateless environment, then you could use a cursor. The web is a stateless environment, and therefore the record set needs to be cached either to disk or memeory. The other alternative is to rerun the query for each

[PHP-DB] newbie question

2004-02-13 Thread t
hi, i am relatively new to php and new to this email list. i have what i think are fairly simple questions about using mysql and php. i have done some research and can't seem to find the answer i need. # 1. i want to set the date format to display dates in a format other than the standard

Re: [PHP-DB] newbie question

2004-02-13 Thread Peter Beckman
On Fri, 13 Feb 2004, t wrote: hi, i am relatively new to php and new to this email list. i have what i think are fairly simple questions about using mysql and php. i have done some research and can't seem to find the answer i need. # 1. i want to set the date format to display dates in a