Jump to content

dreamsofshadow

New Members
  • Posts

    7
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

dreamsofshadow's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. yea i do imagine that it is timing out... which is bad. I dont know how to check the error logs... mysql_error() you mean? and how do i set it to just wait till its finished, im ok with it taking ten minutes! Fatal error: Maximum execution time of 60 seconds exceeded in C:\Program Files\xampp\htdocs\new\dba.php on line 284
  2. because it timed out, and i thought opening more and usign them randomly would let me execute more data at a fast rate. I came to that conclusion because so far the way that has worked the fastest and got the most data into the db before crashing was opening a connection inside each function. I realize now that the random conection idea isnt going to work so any ideas?
  3. basically i have a window class that creates html elments based on sql datatables, and i have another class that interprits input and creates entries in the database in a complimentary kind of architecure. Basically doing this means that creating 400 divs means 20,000 entries and a ton of calculations, as well as a huge amount of sql resources just to figure out what goes where and how.
  4. <?php class DBA { var $sqlresource; var $sqlusername; var $sqlpassword; var $con; public function DBA($sqlres, $sqlun, $sqlpass) { $this->sqlresource = $sqlres; $this->sqlusername = $sqlun; $this->sqlpassword = $sqlpass; $this->con = array(); for($i = 0; $i < 10; $i++) { $this->con[$i] = mysql_connect($sqlres, $sqlun, $sqlpass); if (!$this->con) { die('Could not connect: ' . mysql_error()); } } } .................... mysql_select_db($database, $this->con[(rand(0, 9))]); thats where i am now, making it use random connections did not help at all. I know nothing about this sort of stuff, ive taught myself everything i know about coding through brute forc. It sucks cause i really want to finish what im working on, but down the raod this could amount to a real problem. anybody have any ideas? The thing is im entering 10,000+ (now that i think about it its actually around 20,000) some entries at a time(update table), getting data to perform tests on how to enter it, i mean the raw calculations have got to tear my lil' laptop apart. I just wish it would complete it and not give up cause its taking to long... its ok if its slow it just needs to work... this is a list of some the functions im using... public function DBA($sqlres, $sqlun, $sqlpass) public function deletedatabase($database) public function deletetable($database, $table) public function createdatabase($i) public function createtable($databasename, $ii, $a, $b) public function tableinsert($databasename, $ii, $a, $c) public function displaytable($dbname, $ii) public function displayedittable($dbname, $ii) public function gettabledata($database, $table, $row, $field) public function deletetablerow($database, $table, $row) public function listdatabases() public function listtables($dbname) public function displaytablelength($database, $table) public function gettablelength($database, $table) public function getdatabases() public function gettables($dbname) public function getfieldnames($database, $table) public function insertempty($database, $table) public function updatetable($database, $table, $row, $col, $newdata) public function addfield($database, $table, $newfield, $newfieldtype) public function deletecol($database, $table, $col) public function getcol($database, $table, $col)
  5. ok well i tried making it randomly access ten connections, still only gets a small fraction of data in and gets error for exceeding 60 seconds! do i need to make a script outside of this one that ques data and enters it?
  6. I designed my own database abstraction class that handles all my db needs. Well at first within each function in the class i was opening and closing a connections within each function, but when i plugged the class into my other script, i would get what i believe was an error telling me i had opened to many connetions. (at that point i was entering 10228 entries at a time). I would get that error after about a third of the information ahd been put into the database. So after thinking about it, i changed the way the database opened its connection having it instialized with the class and then utilized in functions within the class by using $this->. Now it runs hella slow and i get about an 1/8th of the data in before i get an error saying the script ran over the 60 second marker. So now im thinking about opening an array of 60 connections when i initialize the script and then having the functions access them at random. Will that work? Any ideas. I;m also doing this on an older laptop, pentium m @ 1.7ghz, 2gigs of ram(upgraded), etc. HELP PLEASE
×
×
  • 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.