Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
  Advanced Search
  HOME    TRACKER    PHP


SuperbHosting.net have generously sponsored dedicated servers to ensure a reliable and scalable dedicated hosting solution for BigResource.com.





DELETE TimeOut Issue On A Large Database


When I run the script below, it results in a timeout. Running the commands through phpMyAdmin, results in a timeout too.

Table1 has 40,000 records and Table2 has 35,000 records. I run the script to get rid of the duplicates.

Is there a way that I can check for duplicates without the timeout issue? I tried the while loop through PHP and that results in a timeout too. Code:




View Complete Forum Thread with Replies

Related Forum Messages:
SESSION Timeout Issue
I tried a few code I found on the web but they only appear to work on a Windows environment. I am trying to get this to work within an Apache Server on a Linux box. In my code I detect if a session still exist and if not, they get redirected back to the login page. I want the session to timeout after 20 mins of inactivity. I come from an ASP/ASP.NET and ColdFusion background. It is set easily in those languages. Code examples that worked on Apache Web Servers in a LINUX environment would be awesome.

View Replies !
Blob Data - Timeout Issue
Hello,

I have success when uploading a binary file to a mysql "blob" type when a file is not larger than 2.5MB. When uploading a file >2.5MB, I get an error of MySql server has gone away or cannot allocate file and I get "Couldn't Add File to Database" .
I've read the manual on the error, but having checked all the settings i.e. max_allowed_packet=16M, php.ini settings of upload_max_filesize=16M, post_max_size=16M, max_execution_time=3600 and also httpd.conf timeout= 3600 and the error still persists. Is it mysql, php, apache or the script?

HTML:

<form enctype="multipart/form-data" name="frmUploadFile" action="grabfile.php" method="post">
<INPUT TYPE="hidden" NAME="MAX_FILE_SIZE" VALUE="16000000">

The script: grabfile.php

<?
$dbServer = "localhost";
$dbDatabase = "";
$dbUser = "";
$dbPass = "";

$fileHandle = fopen($fileUpload, "r");
$fileContent = fread($fileHandle, $fileUpload_size);
$fileContent = addslashes($fileContent);

$sConn = mysql_connect($dbServer, $dbUser, $dbPass)
or die("Couldn't connect to database server");

$dConn = mysql_select_db($dbDatabase, $sConn)
or die("Couldn't connect to database $dbDatabase");

$dbQuery = "INSERT INTO myBlobs VALUES ";
$dbQuery .= "(0, '$strDesc', '$fileContent', '$fileUpload_type')";

mysql_query($dbQuery) or die("Couldn't add file to database");

echo "<h4>Upload of $fileUpload_name is complete.</h4>";
echo "The details of the uploaded file are shown below:<br><br>";
echo "<b>File name:</b> $fileUpload_name <br>";
echo "<b>File type:</b> $fileUpload_type <br>";
echo "<b>File size:</b> $fileUpload_size <br>";

?>

Any suggestions?

View Replies !
Array_rand() Issue With Large Array
Awhile back, I wrote a script that automated child rolling for my RPG. It was actually my first php script. When I made the script, I put the boy names in one array, and the female names in another. Each array had only about 130 names each for a total of 260 names and it worked fine. Just recently I found a larger list of names, and decided to add them into the array (12,500+ names total). After adding them to the array (in php files, not a database) it seems that only the first 30 or so are chosen, and I don't know why.

I'm sure I should use a MySQL database for this, but I dont feel like having to make 12,500+ queries for the names, and I already have used 3 MySQL databases at my host (I only get 5, but plan on using the other 2 soon).

Here is a live demo if you would like to see it in action, and see what it does...

Here is the code that deals with the names that is sent by a form. (note: this is not all of the script, only parts that influence the overall outcome, and deal with the names):

View Replies !
Database Connection Timeout
whan i tried to connet to databaes. i got "timeout".could u tell me How should I avoid this time out issue?

View Replies !
Importing A Large Database
I have a back of mysite in sql. And it appears that line 4114 is currupt or something.

Query: CREATE TABLE dstore ( uid varchar(255), name text, value text, enteredtime timestamp(14), id int(11) NOT NULL auto_increment, PRIMARY KEY (id), KEY nameidx (name) );

MySQL: BLOB column 'name' used in key specification without a key length

I'm using bigdump to import it. is there any other script that will do this where I can make it skip that line? I can't open in it and remove the line do to the database is far to large for that.

View Replies !
Large Database Design
i'm starting a project that has the potential to be a lot larger than anything else that i've done and I need some advice from the experienced...here's the basics. Users log in to a web site.

users belong to a company->companies have projects->projects have docs, etc...

previuously all this information had been in one database separtated into tables. so if I have 50 companies on the website and each company has 20 projects and each project has 100 documents. my project documents table starts to get huge (100,000 rows). Would it be wise to separate each company into it's own database? Does this make sense or am I just used to working at too small of a scale?

View Replies !
Large Database Expansion
how to best expand with larger databases. I have a decent size database running on it's own dedicated server (over 10 million entries) and the performance seems to be slowing. As it stands now,

when I run a search query it usually slows up the site tremendisouly. Usual MySQL error I get is: Too many connections. This is a feature I have been holding off adding to my site because of that.

I know code optimization is a huge factor but it almost seems it's too large to give the power to search to my users. I was wondering if I should copy the database on a new server just for search? maybe updating it weekly or something with the new entries?

View Replies !
Large Gap When Editing Text From Database
My first PHP project is a very simple blog system and I have a page which lists blog entries. This page provides a link to the edit page, when clicked opens the edit page and inserts the values from the database into the from. My problem is that it puts in a large gap of two tabs and two spaces the start of the from. The challenging thing is that if I slick submit, the gap is not put into the post.

View Replies !
Upload A Large (1mb) Binary Into Database A Form
Getting this error when trying to upload a reasonably large (1mb) binary into our database via a web form. The system is working just fine with smaller files. I think that the PHP settings for uploads are fine - plenty of execution time, uploads and POST set to 25mb. Are there similar settings for MySQL? I've had upload problems before but it usually results in a PHP error or white screen. For me to get my error screen returned with MySQL message the PHP script must have completed it's execution, so I'm thinking the problem is with mysql somewhere.

View Replies !
Large Number Of Looped Database Inserts Fails
I'm reading the pixels of an image and storing them in a database table which has an auto incremented key (the code is being executed by a browser page). Every time I get to approximately 3000 rows (the number is never the same) the code stops. No error. It just stops.

The echo of $sqlstring works right up to the point where it stops. It only happens for large enough values of $scale, e.g 10 is fine (presumably because it only has 100 iterations) but 100 fails because there should be 10000 iterations. $source is the name of the black and white image and it has the same dimensions as $scale. Code:

View Replies !
Large Link-Ranked-Database-script Not Working?
i am not sure if its just a parse error , but it doesnt say theres a parse error, and i cannot find anything wrong with the script.

But when i start it, nothing shows up, although it use to before but after some parse errors i fixed it and now the whole script won't show. Just a white blank page which i have tried days trying to figure out why. Code:

View Replies !
Curl Timeout Vs Socket Timeout
We have two versions of client code, one using curl, and other one using raw sockets via fsockopen(), and we use the following code to set the i/o timeouts:

1) curl:
.
.
curl_setopt( $handle, CURLOPT_TIMEOUT, 1 );
.
.
$resp = curl_exec($handle)

2) sockets:
stream_set_timeout( $sock, 1);
Here we use frwrite() and fread() to send the request and read the...

View Replies !
Delete From Database
I have code that does not delete from a database. The same code (cut an
paste in the same file, but different function and having a different query)
works. So, of course, I tested the query interactively. I echoed the query
and did a cut and paste when interactively connect to the database. That
one worked so it isn't the query since interactively it is seeing exactly
the same thing as the code produces.

Here is the code:

function deleteCatalog($catalog) {
$query = "DELETE FROM CatalogNames WHERE sCatalogID='" . $catalog . "'";
mssql_select_db($database_Login, $_SESSION['Login']);
$result = mssql_query($query, $Login);
...
}

The $query echos:
DELETE FROM CatalogNames WHERE sCatalogID='CMP'

As an example of code that works (in the same file)
function addToCatalog($cat_id, $cat_name) {
$query = "INSERT INTO CatalogNames (sCatalogID, sCatalogName) " .
"VALUES ('" . $cat_id . "', '" . $cat_name . "')";
mssql_select_db($database_Login, $_SESSION['Login']);
$result = mssql_query($query, $_SESSION['Login']);
...
}

The second and third lines are identical (cut and pasted) as in other places
in the same code. In fact, it is only in this file that I do all the
database work. Every other function works. This is the only delete,
however.

View Replies !
Delete Database
using php and mysql how can i tell the my website to move any entry older than 30 days to a different table and then delete it below i have some script i did try but this doesnt work (im using unix timestamp incase that changes anything)

mysql_query("
INSERT INTO newsarchive (id, postdate, title, newstext)
SELECT id, postdate, title, newstext FROM news WHERE postdate < DATE_SUB(curdate(), INTERVAL 30 DAY)");

mysql_query("DELETE FROM news WHERE postdate < DATE_SUB(curdate(), INTERVAL 30 DAY)");

mysql_close($link); //clean up

View Replies !
Database/coding Issue?
I have users table. with usernames and info on those users. The info that i have setup for this portion is userid_2 What i have planned for this is to call up that userid_2 from everyuser in a sequence. like this:

user1: userid_2 = 1
user2: userid_2 = 2
user3: userid_3 = 3

now i would like it to basically record all of these numbers.. (not add them.. subtract.. nothin like that) just record them. Then in the .php file. I want to have an if statement saying that:

if userid_2 = 1
echo user1's information

then display an image.

if userid_2 = 2
echo user2's information

then display a different image i currently don't have anything coded. on account of that i would like your guys help. b4 i totally screw it up.. then get lost. and having to rewrite it all again. (i know thats how most people start out.) but thats the miracle of these forums.

View Replies !
Recursive Database Delete
I have two tables in my database, one for the folders, where each folder has a parent id and an id itself, and one for the files where each file has a parent id for the folder its in. Now If the user deletes a folder, every file and folder within it, no matter how many there are, should be deleted. Can anyone give me the idea?

View Replies !
Delete Item From Database
I still can't figure out how to delete an item from my shoppingcart. I have tried different ways to do this, but its impossible.

-a button or link that deletes a item from my database
-the php script that deletes it

here is a suggestion:

$slett = "DELETE ID, VARE, MODELL, STR, ANTALL, PRIS,
TOTALPRIS FROM USER_TRACK
WHERE USER_ID = "$user_id"";

But how can i assign this to a button?

View Replies !
Delete Row In Database By A Selectbox?
I'm having a world of trouble with this. I have a selectbox of names....when they selectone and hit delete I want it to delete it from the database. I dont think i'm getting any value from the select box. Here is the code I have : PHP Code:

View Replies !
Delete A Row From A Database Table
I'm trying to delete a row from a database table.  I've made a connection yet it's not working.  Is there something wrong with the following code?

mysql_query("DELETE * from  `contactinfo` WHERE Submission_Number = 1 ");

View Replies !
How To Delete MySQL Database.
I've got three hostings with the GoDaddy hosting service. The hostings are supposed to provide only one MySQL database each. I've just recently noticed in the phpMyAdmin program that separate databases, each with the name "test," has appeared in two of the three hostings.

I don't know how they got there. I didn't put them there. I contacted GoDaddy's technical support. They said that the "test" databases automatically comes with the phpMyAdmin program. Of course, that's not right. Anyway they said that I could delete the extra database without damaging anything.

View Replies !
Delete Data From Database
Let's say i have two tables,

table_one;
userid,userinput,indexno

table_two;
cond,qant,amp,indexno

the indexno in table_one and table_two are the same.if i choose to delete one row of data in table_one,i want the data with the same indexno in table_two be deleted as well.
how can i achieve this?

View Replies !
Issue Accessing MySQL Database
I get this error when trying to access MySQL "1251 Client does not support authentication protocol requested by server; consider upgrading mysql client. Now, i have installed MySQL 5.0.

View Replies !
Issue Insert ' Into Database From Form
I am unable to insert a ' through a form into my data base here where it is messing up i believe: PHP Code:

View Replies !
Mark A Row In My Mysql Database As To Be Delete
Is there a way in php that I can mark a row in my mysql database and then later so delete these rows that have been marked?

View Replies !
Database Auto Count What About Delete?
I have a table that give a unique ID to certain Articles.
To give the ID i simply use the Auto count of the DB.

But what happens when i delete a record? i am now missing an ID.
How can i insert a row and give it the first available number?

For example ID 1, 2, 4, 5, 6

i would Insert and set the ID number to 3.

View Replies !
Delete Data From MySQL Database
I am new to PHP and MySQL but I have setup a MySQL database. I can view the information in an HTML table using PHP scripts and can delete an entry form the database table, but what i need to do is to be able to delete an entry by selecting a radio button next to the relevent information however when i try to add a form in the PHP script i get an error.

View Replies !
How To Delete Multiple Entries From Database?
I ran this script Im working on twice by accident which caused a ton of duplicate entries. I dont want to start over so how would I delete multiple entries in a database?

View Replies !
Database Update/edit And Delete
i have spent the last few days trying to create a simple script to add/edit and delete entries in a mysql database with php. i have 1 database with 40 tables, each table has 3 fields (id, header and body)

i created an input page with input fields for header and body. the table to store the information in is selected from a drop down menu. all this works fine.

for some reason i cannot get the edit and delete page top work at all. would someone mind taking a look at the code and let me know what i am doing wrong? Code:

View Replies !
Delete From Flat File Database ?
I have recently started to code a Flat file database (just for fun) and it's going fine, but I was wondering whats the best way to delete a line from the file.

I have this code below and I would like to add a delete button besides each line, which would obviously delete that line. But I do not know the best way to go around doing this as I don't know any specific functions to use. Code:

View Replies !
Using Checkboxes To Delete Record From Database
i would like to use check boxes to delete records from the database. my problem is, the records belong to different tables. how do i indicate in my code "DELETE from blah blah... " from which table to delete from..

View Replies !
File Upload Issue - Unable To Upload A Large File
I am using PHP Version 4.4.3 under Linux/Apachie to upload files.
The PHP.ini upload_max_filesize is 2M, which I need to override this
in the HTML (see below). I changed the MAX_FILE_SIZE to 4,000,000
but the system only accepts files less than 2M.

Is the override wrong, do I need to raise the limit in the PHP.ini
file, or is the Apachie issue.

<form name="upload" action="admin.php" method="post"
enctype="multipart/form-data">
<input type="hidden" name="MAX_FILE_SIZE" value="4000000">

View Replies !
Getting Database Results And Spreading Over Pages Issue
Having an issue with handling the query data and spreading over pages.

If i have a SELECT query run with LIMIT $offset, $rowsPerPage but check the potential number of rows in the table to discover the pages vs limits, then i get pages for all items in the table ignoring the select conditions results. Or if i use the total rows from the select its not true as its cut by the LIMIT? Code:

View Replies !
Header - PDF Files Stored On A Database Issue
I have a few PDF files stored on a database. My client says that firefox doesn't force you to save the file, instead tries to open it, and it's displayed wrong (like a text file full of weird characters). I think this just happens on older versions of Mozilla/firefox, but I think it can be solved. Does anybody know how? I was trying something like: Code:

header('Content-Disposition: attachment; filename="' . $id_file . '_' . $file_name[0] . '.pdf"');

View Replies !
How To Delete All Database Entires Older Than 30 Days?
One of the fields in my database is called ad_date which is of date type and stored dates int he format YYYY-MM-DD. I would like to perform a DELETE SQL statement in my PHP script which deletes all records with an ad_date value older than 30 days.

I knoy this is also an SQL question, but it is the 'older than 30 days' part which I'm stuck with and so figured it would be better in the PHP forum as I think I need to use PHP to calculate todays date - 30 days.

View Replies !
How To Delete A MySQL Database Table Without System()
I want to delete a MySQL table without using functions of the OS, so
that my php script can run on any webserver. Can I use a command like

$sql = "DELETE FROM tablename";

or are there better ways to do the job?

View Replies !
Simplify Insert-update-delete From Database
I'm looking for some functions or objects allowing to
select-insert-update-delete from any table in a mysql database without the
need to create a new query every time. Example:

selectdatas(array('field1','field2','fieldn'),arra y('table1','tablen'),array('left
join,idy','inner join, idx'))

then the function build the query, execute it and then return an object with
the query result.

I must build a database driven site that is 90% of the time spent on
building queries. If I may avoid build them manually it will help me a lot
and let me gain some days of programming.

View Replies !
Delete Database Base On User Choice
i want to let user delete their data from database. Note: one user may have more than one rows of data. table as following;

TCid UserName Topic Content
1 q1 aa aa
2 q2 aa aa
3 q3 aa aa
4 q1 aa aa
5 q2 aa aa

And i code as following steps;

1) ask user input user name

2) Display out all the data which the users got. (it is in delete.php file.)
in here, i will use the check box, to let the user choices which data they will delete.
note: i will try to make the Cid relate with the input name, so later on i can delete
the data base on Cid.

3) i will delete the data base on the user choice(it is in deleteR.php file).
but at the movement, i just want to test where i can get the value of the TCid or not
(because i will delete some datas base on the TCid which the user choiced).

The problem i go now, it is from the step 3, i could not get the TCid's value out,
that's mean, i could not delete some data base on the user choiced. Code:

View Replies !
Delete Multiple Records In The Same Database Querie?
I have some code that deletes records from the database, in a loop. However its prety inificient as it makes a seperate database call in every loop whcih is slow. PHP Code:

for ($i=0; $i<count($idarray); $i++)
          db_query("delete from clicks where id='$idarray[$i]'");

Is their a more efficient way of doing that? It is posible to delete multiple records in the same database querie?

View Replies !
Database Delete Repeat Records And Add Up Totals
I have a database full of order records for our website. My goal is to delete people from the same 'address' field and add up the 'total' into one record. Can i get some example code on how this would be done?

View Replies !
It Wont Delete The Entry From The Database. The Page Just Refreshes?
It wont delete the entry from the database. The page just refreshes? Code:

View Replies !
Automatic Delete From MySQL Database Table Expired Records?
I have a question . . .

how can i delete from MySQL database table automatic expired records ?
?

One think is to make a service that deleting the expired records . . .

Any other method ?



View Replies !
Simple Login Page To Delete And Edit Things In Mysql Database
How do I build a simple login page on my site? I need a way to login to my admin area in my webshop, so I can add, delete and edit things in mysql database. I don't need help with add, delete and change things, only the login thing.

The users should not even know that there is a admin login page. The users don't login to shop, they just shop so I can't use the user login page because there is no such page. Can someone please give me some guidelines for this?

View Replies !
Delete Record - When The Delete Link Is Clicked The Next Page Is Blank And Nothing Is Deleted.
This is my "delete.php" and this "todo/delete.php?id=64" an example of a link to it generated from the index.php page. When the delete link is clicked the next page is blank and nothing is deleted. What have I done wrong?

<?
include("dbinfo.inc.php");

mysql_connect(localhost,$username,$password);
@mysql_select_db($database) or die( "Unable to select database");

$id="delete from todo where id='$id'";
mysql_query($id);

mysql_close();
?>

View Replies !
Mysql Delete - $query = Mysql_query("DELETE
how would i do the following ?

$query = mysql_query("DELETE notes, datestamp, abs_value, ID FROM absence_mgt  WHERE datestamp='$date' AND ID='$vtc_login' ") or die(mysql_error());
im just getting "Unknown table 'notes' in MULTI DELETE" ?

View Replies !
Query Issue - Item Grouping Issue
I have a number of items in a database and I group them together by each's series number (ranges from 1-20). The query then sorts them by series ascending from 1-20, but does so by sorting all the ones that begin with 1, then 2, etc where the 10-19 series show up before 2-9. I know why it's happening but is there a way around it?

View Replies !
DELETE RECORDS - Database Adding New Records
iv got the database adding new records, and now I want it to display all of the records that are there buy name and id number, then i want u to be able to type in the id number of the customer u wish to delete and it shoudl delete it, sounds good buts its not actually deleting the record. it says it does, but its not doing it. Code:

View Replies !
Timeout
Does anyone know how to delay time within loops?

(ie I want to wait 3 seconds for going to the next loop of the database query)....

View Replies !
CGI Timeout
I keep getting the following error when I try to execute a script.

"CGI Timeout The specified CGI application exceeded the allowed time for processing. The server has deleted the process."

In my php.ini file I have changed the "timeout" period to "0" which I think means there is no timeout limit. I am connecting to a table in a database that has many records due to which the script is timing out. Could this be an IIS problem?

I have PHP Version 4.0.4pl1 installed and am connecting to a Sybase ASE database. The connection is working fine but I only get this error when I start copying data from the Sybase ASE database to a ".csv" file.

View Replies !
PHP Timeout
I need help adding an if statement to the code below if it times out trying to query the server. I get this error if my game server is offline on my website...

Warning: unpack() [function.unpack]: Type L: not enough input, need 4, have 0 in showserver.php on line 104 Code:

View Replies !
Ftp Timeout
I have a site that allows the user to enter in an IP address and a port within the company to ftp barcode file to send directly to a printer. However, if they put in an invalid IP I have this code die("Server could not be found."); This is all good but the browser looks for this IP address for way too long before it displays this message. Is there a way to shorten this?

It would be nice for this message to come up as soon as the IP address could not be found instead of retrying(which is what I assume is what it is doing).

View Replies !
Fsockopen Won't Timeout...
Hi,

i am using the following code to check a few ports on a few servers to see if they are up or down. But they never seem to time out, can someone tell me what to do pls?

View Replies !
Php 4.06 Cgi Timeout On Win2k
I have a script that works on unix but when running it on a windoz box I get a CGI Timeout screen.

What is the difference between the two systems that would cause this error?

do I have to modify somthing in the PHP.INI?

View Replies !

Copyright © 2005-08 www.BigResource.com, All rights reserved