List:General Discussion« Previous MessageNext Message »
From:Martin Edelius Date:February 25 2000 2:27pm
Subject:Re: Why do I get a full table?
View as plain text  
Well, the system is working without problems besides when I execute this
query:

$result=mysql_db_query("$DB_Service","select C.UIV from Common as C,
Inlamningsstalle as Inl, Insamlingsstalle as Ins, Reparationsstalle as R
         where C.Servicenummer like '$servicenummer'
          or (Inl.Inlamningsstalle='$UserUnitUIV' and C.UIV=Inl.UIV)
          or (Ins.Insamlingsstalle='$UserUnitUIV' and C.UIV=Ins.UIV)
          or (R.Reparationsstalle='$UserUnitUIV' and C.UIV=R.UIV)
         order by C.Servicenummer asc");

Here are the tables (Outlook Express will probably mess them up though):
mysql> desc Common;
+---------------+------------------+------+-----+---------+----------------+
| Field         | Type             | Null | Key | Default | Extra          |
+---------------+------------------+------+-----+---------+----------------+
| UIV           | varchar(30)      |      | PRI |         |                |
| Status        | varchar(30)      |      | MUL |         |                |
| Apparatagare  | varchar(30)      |      |     |         |                |
| Modell        | varchar(30)      |      | MUL |         |                |
| Serienummer   | varchar(40)      |      | MUL |         |                |
| Felanmarkning | text             | YES  |     | NULL    |                |
| Utfort_arbete | text             | YES  |     | NULL    |                |
| Emballage     | text             | YES  |     | NULL    |                |
| Tillbehor     | text             | YES  |     | NULL    |                |
| Ater_kund     | int(10) unsigned | YES  |     | NULL    |                |
| Debiteras     | text             | YES  |     | NULL    |                |
| Skador        | text             | YES  |     | NULL    |                |
| Servicenummer | int(10) unsigned |      | MUL | 0       | auto_increment |
+---------------+------------------+------+-----+---------+----------------+
mysql> desc Inlamningsstalle;
+-------------------+------------------+------+-----+---------+-------------
---+
| Field             | Type             | Null | Key | Default | Extra
|
+-------------------+------------------+------+-----+---------+-------------
---+
| Inlamnad          | int(10) unsigned |      | MUL | 0       |
|
| Inlamningsstalle  | varchar(30)      |      | MUL |         |
|
| Kundfoljesedel    | varchar(30)      |      | MUL |         |
|
| Lopnummer         | int(10) unsigned |      | MUL | 0       |
auto_increment |
| Betalare          | varchar(30)      |      | MUL |         |
|
| Belopp            | int(6)           | YES  |     | NULL    |
|
| Paslag            | int(3)           | YES  |     | NULL    |
|
| Betalningssatt    | text             | YES  |     | NULL    |
|
| Delbetalare       | varchar(30)      |      |     |         |
|
| Delbelopp         | int(6)           | YES  |     | NULL    |
|
| Delbetalningssatt | text             | YES  |     | NULL    |
|
| Inpris            | int(6)           | YES  |     | NULL    |
|
| Ater              | date             | YES  |     | NULL    |
|
| Skickad           | date             | YES  |     | NULL    |
|
| UIV               | varchar(30)      |      | PRI |         |
|
+-------------------+------------------+------+-----+---------+-------------
---+
mysql> desc Insamlingsstalle;
+-------------------+------------------+------+-----+---------+-------------
---+
| Field             | Type             | Null | Key | Default | Extra
|
+-------------------+------------------+------+-----+---------+-------------
---+
| Inlamnad          | int(10) unsigned |      | MUL | 0       |
|
| Insamlingsstalle  | varchar(30)      |      | MUL |         |
|
| Lopnummer         | int(10) unsigned |      | MUL | 0       |
auto_increment |
| Betalare          | varchar(30)      |      | MUL |         |
|
| Belopp            | int(6)           | YES  |     | NULL    |
|
| Paslag            | int(3)           | YES  |     | NULL    |
|
| Betalningssatt    | text             | YES  |     | NULL    |
|
| Delbetalare       | varchar(30)      |      |     |         |
|
| Delbelopp         | int(6)           | YES  |     | NULL    |
|
| Delbetalningssatt | text             | YES  |     | NULL    |
|
| Inpris            | int(6)           | YES  |     | NULL    |
|
| Ater              | int(10) unsigned |      |     | 0       |
|
| Skickad           | int(10) unsigned |      |     | 0       |
|
| UIV               | varchar(30)      |      | PRI |         |
|
+-------------------+------------------+------+-----+---------+-------------
---+
mysql> desc Reparationsstalle;
+---------------------+----------------------+------+-----+---------+-------
---------+
| Field               | Type                 | Null | Key | Default | Extra
|
+---------------------+----------------------+------+-----+---------+-------
---------+
| Inlamnad            | int(10) unsigned     |      | MUL | 0       |
|
| Reparationsstalle   | varchar(30)          |      | MUL |         |
|
| Lopnummer           | int(10) unsigned     |      | MUL | 0       |
auto_increment |
| Paborjad            | int(10) unsigned     |      |     | 0       |
|
| KF_lamnat           | int(10) unsigned     |      |     | 0       |
|
| KF_besvarat         | int(10) unsigned     |      |     | 0       |
|
| Betalare            | varchar(30)          |      | MUL |         |
|
| Belopp              | int(6)               | YES  |     | NULL    |
|
| Paslag              | int(3)               | YES  |     | NULL    |
|
| Betalningssatt      | text                 | YES  |     | NULL    |
|
| Delbetalare         | varchar(30)          |      |     |         |
|
| Delbelopp           | int(6)               | YES  |     | NULL    |
|
| Delbetalningssatt   | text                 | YES  |     | NULL    |
|
| Inpris              | int(6)               | YES  |     | NULL    |
|
| Skickad             | int(10) unsigned     |      |     | 0       |
|
| Ater                | int(10) unsigned     |      |     | 0       |
|
| UIV                 | varchar(30)          |      | PRI |         |
|
| Reparator           | varchar(30)          |      |     |         |
|
| Kostnad_moms        | smallint(5) unsigned |      |     | 0       |
|
| Kostnad_timtid      | smallint(5) unsigned |      |     | 0       |
|
| Kostnad_grundavgift | smallint(5) unsigned |      |     | 0       |
|
| Kostnad_admin       | smallint(5) unsigned |      |     | 0       |
|
| KF_forskott         | smallint(5) unsigned |      |     | 0       |
|
+---------------------+----------------------+------+-----+---------+-------
---------+

I haven't even begun optimizing tables or queries since this is still in the
development phase. Any help is very much appreciated.


Best regards,
Martin Edelius

Spirex Digital Design
--------------------------------
www: http://www.spirex.se
Mail: martin.edelius@stripped
Phone: +46-31-514651, 0708-113711
Fax: +46-31-514331
Aröds Industriväg 3c
S-422 43 Hisings Backa
--------------------------------
If I haven't got back to you or done what I'm supposed to, let me know again
as I have too much to do for my own good...

Thread
Why do I get a full table?Martin Edelius25 Feb
Re: Why do I get a full table?Ed Carp25 Feb
  • Re: Why do I get a full table?Martin Edelius25 Feb
  • Re: Why do I get a full table?Martin Edelius25 Feb
    • Re: Why do I get a full table?sinisa25 Feb
  • Re: Why do I get a full table?Martin Edelius25 Feb
    • Re: Why do I get a full table?sinisa25 Feb
  • Re: Why do I get a full table?sasha25 Feb