Jump to content

eric1235711

Members
  • Posts

    107
  • Joined

  • Last visited

    Never

Everything posted by eric1235711

  1. I saw that what was overloading is that list of Sleeping processes...
  2. I find that I´ll make a php program to keep killing automatically
  3. Fenway, you said to (B) use a shot prefix, you mean that I shoud make a column of (eg) the two (or three) first digits of CEP?
  4. I made a search and looks like that it is a bug... http://bugs.mysql.com/bug.php?id=11897
  5. the query is very simple, eg: SELECT * FROM addresses WHERE cep = '01001000' It always returns a single row. a shema is this? Field Type Null Default ID  int(11) Yes  NULL  TYPE varchar(20) Yes  NULL  ADDRESS varchar(60) Yes  NULL  NUMBSTRT varchar(8) Yes  NULL  NUMBEND varchar(8) Yes  NULL  SIDE varchar(1) Yes  NULL  SUBURB varchar(50) Yes  NULL  CEP  int(8) Yes  NULL  CITY varchar(38) Yes  NULL  CITYID varchar(5) Yes  NULL  STATE varchar(2) Yes  NULL  ESPECIAL  varchar(70) Yes  NULL  Indexes: Keyname Type Cardinality Field PRIMARY  PRIMARY  559819  ID  CEP  INDEX  559819  CEP  Space usage: Type Usage Data 39,707 KB Index 11,797 KB Total 51,504 KB     Row Statistics: Statements Value Format dynamic  Rows 559,819  Row length ø 72  Row size  ø 94 Bytes  Next Autoindex 559,820  Creation Oct 02, 2006 at 06:30 PM  Last update Oct 02, 2006 at 06:30 PM  Last check Oct 02, 2006 at 06:30 PM 
  6. Are you sure that the field names are right? Are you sure that there´s any reccord?
  7. ??? My processs list in phpmyadmin is showing a lot of sleeping processes... And some of them just go out when I kill... What´s that?
  8. hello, I got a table with more than 500.000 records. It´s a list of adresses and postal-codes (I don´t know if this is the right word, here it cals CEP) I find that this table overloaded the server, a simple query in it was pocessing a long time... I find that it hapened when a lot of people accessed it at same time... Do you think that this table is too large? In all the system there is an only one simple query that calls this table, looking for the address of a CEP number. This CEP field is a key. Now the server looks like running normaly, but I´m thinking about hashing this table... in ten or a hundred tables... What do you think?
  9. Try to think why use && instead of ||
  10. I find that is just a logic problem... try this: [code] <?php if($rank != "mod" && $rank != "admin"){ echo "you're not authorized"; exit(); } ?> [/code]
  11. $result content is the resource id...you must fetch to get something and also, php won´t guess what is $total... try this: [code] <?php $query = "SELECT SUM(number) AS total FROM records";             $result = mysql_query($query);             list($total) = mysql_fetch_row($result); // look at php.net to learn more about this             echo 'the total is:';             echo $total; ?> [/code]
  12. [quote author=thorpe link=topic=109411.msg441021#msg441021 date=1159199453] It would be quit easy however to build a Linux system that would boot straight into a full screen browser. [/quote] nice idea
  13. the source code will be avaliable... it´s a problem............ or not  :P
  14. thanx thanx... I just forgot it´s name... cron job....
  15. I want to make my php file run every day, automaticaly... how can I do it?
  16. you forgot to close the string: [code] <?php // ... echo "A cheap guitar costs {$Amount}. You can get a discount of {$Discount}.<br />     When you buy at trade price though, you get it at {$Trade}. "; // <<<---------- HERE ?> [/code]
  17. a very simple function to combine: [code] <?php function ericsCombine($a1, $a2){     $output = array();     foreach($a1 as $key => $value){         $output[$value] = $a2[$key];     }     return $output; } ?> [/code] or something like that... You can work a little more on this function, it can get better...
  18. Isn´t you talking about merging? (array_merge) you can make a function to combine... That´s not hard.
  19. [quote author=businessman332211 link=topic=108173.msg435074#msg435074 date=1158344833] those functions shouldn't really hurt anything.  Classes are very good, very helpful, if yuo want to learn how to do them, there not that hard.  Having that many functions just says you have a lot of reusable code, you could probably cut that in half if you converted everything over to OOP. it would probably help server some, but other than that you should be fine.  Just call them when you need them.  Well only include them if you need them. [/quote] You're saying about things like this? [code] <?php class myclass{   myfunct1(){   }   myfunct2(){   }   // (...)   myfuncN(){   } } myclass::myfunct1(); //etc ?> [code] I use it in my own codes...[/code][/code]
  20. [quote author=bholbrook link=topic=108173.msg435071#msg435071 date=1158344734] sounds like you need to read up on classes. we write classes in excess of 100,000 lines without performance degrading [/quote] sorry... I didn´t know, ok... :'(
  21. Here where I´m working there are is a single functions file called 'general.php' with more than 9000 lines. It also includes other function files...  Lips sealed There are almost all the functions (not general functions are there too)... won´t it overcharge the server or will it not do a lot of useless processing? And won´t it put a lot of trash in the server´s memory?
  22. Here where I´m working there are is a single functions file called 'general.php' with more than 9000 lines. It also includes other function files...  :-X There are almost all the functions (not general functions are there too)... won´t it overcharge the server or will it not do a lot of useless processing? And won´t it put a lot of trash in the server´s memory?
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.