[PHP-DB] how to index this table with over 2 mill entries?

2002-03-31 Thread Andy
Hi there, I would like to optimize querrys on a huge table over 2 mio entries with following structure: ID mediumint(9) auto_increment city varchar(50) country_code char(2) province_id char(2) There is a need to do querrys on: city country_code country_code AND province_id I

[PHP-DB] thanks

2002-03-31 Thread Matthew Crouch
i think i got this solved; sorry about the non-php question but there isn't a mysql newsgroup that i know of. Matthew Crouch wrote: Here's an easy one that I can't find laid out for me anywhere: I want a self join that pairs up the id numbers of a table in every permutation e.g. i have id

[PHP-DB] Re: mysql joining 101

2002-03-31 Thread Hugh Bothwell
Matthew Crouch [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... Here's an easy one that I can't find laid out for me anywhere: I want a self join that pairs up the id numbers of a table in every permutation e.g. i have id #s 1, 2, and 3 i need this result: 1

Re: [PHP-DB] LIMIT 0,10 retrieves 10 records, but takes forever!

2002-03-31 Thread Andrey Hristov
LIMIT limits only to output. So if a SELECT creates 1 million rows and you LIMIT 10, you got the first 10 rows but the full SELECT is done. To speedup consider adding some id columnt with unique ints in ascending order. Andrey P.S. I've to go. Have a nice evening. - Original Message

[PHP-DB] Re: Database search question

2002-03-31 Thread Hugh Bothwell
How can I accomplish the following? I have a table called search, I have 3 fields, city, country, type I also have an imput box where you can type in a search word. What I need is, say you type in hotels germany, I need the search to break up the sentence and then search each 3 fields

Re: [PHP-DB] LIMIT 0,10 retrieves 10 records, but takes forever!

2002-03-31 Thread Andrey Hristov
Another suggestion - use explicit joins. SELECT c.*, p.province, co.country FROM test.cities AS c LEFT JOIN test.countries AS co USING(country_c) LEFT JOIN test.provinces AS p ON c.province_no=p.province_id ORDER BY country , province limit 0, 10; This might work. If not read the docs at

Re: [PHP-DB] LIMIT 0,10 retrieves 10 records, but takes forever!

2002-03-31 Thread Andy
thanx, I am gonna play with it Andy Andrey Hristov [EMAIL PROTECTED] schrieb im Newsbeitrag 004301c1d8ca$276af940$0b01a8c0@ANDreY">news:004301c1d8ca$276af940$0b01a8c0@ANDreY... Another suggestion - use explicit joins. SELECT c.*, p.province, co.country FROM test.cities AS c LEFT JOIN

Re: [PHP-DB] thanks

2002-03-31 Thread Jason Wong
On Sunday 31 March 2002 23:05, Matthew Crouch wrote: i think i got this solved; sorry about the non-php question but there isn't a mysql newsgroup that i know of. www.mysql.com ?? -- Jason Wong - Gremlins Associates - www.gremlins.com.hk /* I don't want people to love me. It makes for

[PHP-DB] int or tinyint

2002-03-31 Thread Jennifer Downey
Hi all, Just a simple question (I think). When should I use tinyint over int. and what is the difference between the two? Thanks Jennifer -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP-DB] Re: int or tinyint

2002-03-31 Thread Hugh Bothwell
Just a simple question (I think). When should I use tinyint over int. and what is the difference between the two? MySQL manual section 7.3 (data types): tinyint (8bit), range is 0 to 255 (unsigned) -128 to 127 (signed) int (32bit), range is 0 to 4294967295

[PHP-DB] Re: thanks

2002-03-31 Thread Kim Kohen
G'day Matthew i think i got this solved; sorry about the non-php question but there isn't a mysql newsgroup that i know of. You can find a list at www.mysql.com = Before posting, please check: http://www.mysql.com/manual.php (the manual)

[PHP-DB] Re - Direct a User after a completed Form

2002-03-31 Thread Ethan J. Mings
PHP-DB Mailing List -- I've created a form which loads data to my data table. Works great. Is there a way to allow the user to go to a thank you after the form is completed. Where could I find this is the manual. Tried Location() with little success. Suggestions. -- Ethan J. Mings

RE: [PHP-DB] Re - Direct a User after a completed Form

2002-03-31 Thread Peter Lovatt
?php {do submit data routine} include(thanks.htm) ? should do the trick HTH Peter --- Excellence in internet and open source software --- Sunmaia www.sunmaia.net [EMAIL PROTECTED] tel. 0121-242-1473

[PHP-DB] Table structure and displaying certain thing

2002-03-31 Thread Jennifer Downey
Hi all, I have a table called items here is a dump: CREATE TABLE items ( id int(10) NOT NULL auto_increment, name varchar(50) NOT NULL default '', item_type int(4) NOT NULL default '0', image varchar(100) NOT NULL default '', price int(10) NOT NULL default '0', quantity int(5) NOT

Re: [PHP-DB] Re - Direct a User after a completed Form

2002-03-31 Thread Jason Wong
On Monday 01 April 2002 08:08, Ethan J. Mings wrote: PHP-DB Mailing List -- Could you NOT use the two hyphens to separate the different parts of your post? A lot of email clients interpret whatever follows the two hyphens as a signature and strips it away when replying. I've created a