Re: [PHP-DB] need help on improving performance on this querry

2002-05-07 Thread andy
thank you! I did not know this command. Its 0.16s instead of 1.6! Andy <[EMAIL PROTECTED]> schrieb im Newsbeitrag 043c01c1f5f2$47f5b3e0$[EMAIL PROTECTED]">news:043c01c1f5f2$47f5b3e0$[EMAIL PROTECTED]... > SELECT DISTINCT L.* > from data.languages L, data2.user U > WHERE L.id IN (U.language_1,

Re: [PHP-DB] need help on improving performance on this querry

2002-05-07 Thread szii
SELECT DISTINCT L.* from data.languages L, data2.user U WHERE L.id IN (U.language_1, U.language_2, U.language_3) order by name; I believe the IN clause is a shade faster than multiple ORs, but I'm not 100% sure. 'Luck -Szii - Original Message - From: "andy" <[EMAIL PROTECTED]> To: <

[PHP-DB] need help on improving performance on this querry

2002-05-07 Thread andy
Hi there, I do have a user table with 3 languages. I know that I should have put them into a seperate table. I still could, but would take lots of recoding. I discovered, that as soon as I leave out the OR statements the querry takes under 0.2 s. With the two OR it takes on a 1 records about

Re: [PHP-DB] error

2002-05-07 Thread Maureen
One thing I noticed quickly. You have too many opening ( on the line that says: while (($row = mysql_fetch_array($result, MYSQL_ASSOC)) 3 opening and 2 closing. This would cause a parse error. Without knowing which line is line 11, it is hard to say if there is anything else. HTH

[PHP-DB] error

2002-05-07 Thread Chris Grigor
Howdi guys any help on this would be greatful I have a page that submits to this script with a value of search but when I submit it gives me an error Parse error: parse error in /var/www/html/ul/mysql_fetch_array.php on line 11 anyhelp here would be greatful, I dont see what the error could

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

2002-05-07 Thread Frank M. Kromann
Hi, DB-Library from Microsoft has not been updated since SQL Server 6.x and Microsoft wants people to move to OLE DB so they have no plans on updating the (outdated) library. DB-Library is an old component fram Sybase. The only way to solve this is to use ADO through COM to communicate with th

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

2002-05-07 Thread Michael Bretterklieber
Hi, I ran into the same problem, but the problem I have is that I can't switch to TEXT Datatype because MSSQL doesen't support SELECT DISTINCT or GROUP BY on them. The Workaround: SELECT CAST (fieldxyz AS TEXT) FROM tabelle abc is not useful because we build db-independent apps. I tried to r

Re: [PHP-DB] email

2002-05-07 Thread Jeffrey_N_Dyke
everything you need to know. http://www.php.net/manual/en/ref.mail.php Hope this helps jeff "Natividad

[PHP-DB] email

2002-05-07 Thread Natividad Castro
Hi to all, I have a form where users can post message. After users submit the form I want to be able to send email to a person who is going to review what they submit. How can I do that? Any help is greatly appreciate. Thanks in advanced Nato -- PHP Database Mailing List (http://www.php.net/)

Re: [PHP-DB] selecting records on a random basis with mysql function rand possible?

2002-05-07 Thread andy
cool! works. thanx, Andy "Jason Wong" <[EMAIL PROTECTED]> schrieb im Newsbeitrag news:[EMAIL PROTECTED]... > On Tuesday 07 May 2002 20:52, andy wrote: > > Hi there, > > > > is it possible to get mysql to return a record out of a table on a random > > basis? > > > > I tryed: > > > > select rand(

Re: [PHP-DB] selecting records on a random basis with mysql function rand possible?

2002-05-07 Thread andy
but how can I be sure that this id does exist? sure, I could count all records and than do a rand(0,$value); but there might be a better way in mysql directly. "Chris" <[EMAIL PROTECTED]> schrieb im Newsbeitrag [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > Why not just get a random number in

Re: [PHP-DB] selecting records on a random basis with mysql function rand possible?

2002-05-07 Thread Jason Wong
On Tuesday 07 May 2002 20:52, andy wrote: > Hi there, > > is it possible to get mysql to return a record out of a table on a random > basis? > > I tryed: > > select rand() ID, city > from data.cities > where country = 'CA' > LIMIT 1 > > but does not work though. Has anybody an idea? I tryed also t

Re: [PHP-DB] selecting records on a random basis with mysql function rand possible?

2002-05-07 Thread Chris
Why not just get a random number in PHP and do a select statement like that? IE SELECT ID, city FROM data.cities WHERE country = 'CA' and ID = rand() -Chris At 02:52 PM 5/7/2002 +0200, andy wrote: >Hi there, > >is it possible to get mysql to return a record out of a table on a random >basis?

[PHP-DB] selecting records on a random basis with mysql function rand possible?

2002-05-07 Thread andy
Hi there, is it possible to get mysql to return a record out of a table on a random basis? I tryed: select rand() ID, city from data.cities where country = 'CA' LIMIT 1 but does not work though. Has anybody an idea? I tryed also to read all results and do the random thing with php, but this do

[PHP-DB] Re: database absraction layer

2002-05-07 Thread Manuel Lemos
Adi wrote: > dear all, > > I'm writing database abstraction layer class (like adoDB but much simpler). > What I want to do that it will provide single access function for different > type of database. Currently, it will only support mySQL and PostgreSQL.. but I > just don't know how to do thi

[PHP-DB] Re: php mail problem.

2002-05-07 Thread Manuel Lemos
Hello, Darren Stock wrote: > Hi, I cannot get the php mail function to work from a web browser, if I run > my script from the linux prompt, containing the mail function, it runs fine, > it sends the mail. But If I run it through my browser it doesn't come back > with any errors, it just doesn't s

Re: [PHP-DB] php mail problem.

2002-05-07 Thread Marius Ursache
check errors from sendmail/qmail or your mail client... Darren Stock a écrit : > Hi, I cannot get the php mail function to work from a web browser, if I run > my script from the linux prompt, containing the mail function, it runs fine, > it sends the mail. But If I run it through my browser i

[PHP-DB] php mail problem.

2002-05-07 Thread Darren Stock
Hi, I cannot get the php mail function to work from a web browser, if I run my script from the linux prompt, containing the mail function, it runs fine, it sends the mail. But If I run it through my browser it doesn't come back with any errors, it just doesn't send the mail. my php.ini file is ok,