Figuring Out How Rows Got Deleted
Somehow, thousands of rows in one of my databases got deleted. I can't figure out how. 's' in psql doesn't show a delete command. Nobody else has accessed the server. My only guess is that perhaps I had a psql open, it was in a transaction, then I closed it or something. But I haven't been using transactions. The rows that got deleted were inserted by a ruby script days ago, and I'd been able to use the rows since then, until today. Doesn't PG have a change/transaction log that might yield some clues? There's nothing in PG's normal log, except 'db1 LOG: unexpected EOF on client connection'.
View Complete Forum Thread with Replies
Sponsored Links:
Related Messages:
Figuring Percentage
I have a math problem for php. I have a rating system on my site that I want to display a percentage. The ratings are from 1 to 5. Say I had 4 votes and they were 2,3,4,5 how would I figure the percentage? I tried 4 votes divided by the total (in this case 14) times 100, but that's not coming out right.
View Replies !
View Related
Figuring Out When 2 Hours Have Passed
What I'd like to do is this. get a date and time and determine if it has been a certain amount of time since then. For example, I make an entry in the database of 11:00pm, and I want to periodically check, and if it is 1:00am or later, then I would update the database. Any suggestions?
View Replies !
View Related
Figuring Out A Files Extension?
I have a html page, where one can upload a file. Now the thing is, I can't figure out how to find the files extension in php! The html page's textbox is for a file, so it doesn't export the input of the textbox as a string, so I can not just look at everything past the dot. I thought about making the php file read the file and see what the first letters in it were, and identify it by that, but the thing is that is going to take way too much time and way too many if commands. Does anyone know of a simpler way?
View Replies !
View Related
Figuring Out Secure Form Input
I'm trying to figure out how to do this while hoping it's the right way to do it; The part that determines if user inputs "ANY IRREGULAR CHARACTERS OR CODE" (sql/php) what I don't know how to do. $inputerrors = "You've had some inputting problems, dude." if($_POST['article_title'] HAS ANY IRREGULAR CHARACTERS OR CODE) //then return; $inputerrors .= "It seems as though you're trying to pass code into our servers. Your IP address is $gosun and your ISP is $goto. A likely photo and address of you may be $crossreferenced. If this happens more than 3 times, you will be banned and $goto will be informed of any malicious conduct. If you would just like to hack please go to my hacking server and have some educational malicious fun there."; echo $inputerrors; exit();
View Replies !
View Related
Figuring Out How Much Longer *REWARD OFFERED*
Ok I'm working on a script and it only has to show "YOU WIN" for 5 minutes, I picked those 5 minutes between the minutes 16 and 21. Now outside of those minutes, I want it to say how much time is left until it will be those minutes again. I can't figure out how I can do that. If you post how to achieve the variable to how much time is left I offer $5 paypal. Code:
View Replies !
View Related
Directory Deleted
So far i m using following code for deleting folders and files.But it will only delete those folders which r empty.I want to delete those folders also which has some files.pls give me the solution <?php error_reporting(0); include("../connection.php"); $date = date("m/d/Y"); //For finding current current function dateDiff($dformat, $endDate, $beginDate) { $date_parts1=explode($dformat, $beginDate); $date_parts2=explode($dformat, $endDate); $start_date=gregoriantojd($date_parts1[0], $date_parts1[1], $date_parts1[2]); $end_date=gregoriantojd($date_parts2[0], $date_parts2[1], $date_parts2[2]); return $end_date - $start_date; } ?> ....................
View Replies !
View Related
Cookie Value Set To 'deleted'
I have an issue with a high-traffic website we run which has a user login system. The problem we're getting is for a small minority of users, the 'username' and 'password' fields are giving a value of 'deleted'. I've checked the ISPs to whom the IP addresses belong, and they're from AOL and NTL in the UK. This doesn't appear to be an issue with the ISP as I have other users who have ended up with these IP addresses and have been able to access the system fine. I assume this is something to do with some internet security suite. Has anyone else come across this kind of problem?
View Replies !
View Related
Can Deleted Entries
I got the mySQL database to work and everything works beautifully. Now, I would like deleted entries or completed entries to be posted to another page. This is a job list database to keep track of jobs and once completed I would like to have a column to check that the job is completed, and those entries to post to another web page that I can link to. Is this possible? Would I create another table with the same fields that the completed jobs could post to?
View Replies !
View Related
Cookie Not Deleted
I've just started my first foray into using cookies, and am using PHP to do so. I have a cookie to remember the user's id: setcookie("userid", $userid, time() + 604800); which seems to work fine. I delete the cookie with: setcookie("userid", "", mktime(12,0,0,1, 1, 1990)); trying to be on the safe side by using the date function. My problem is that it all works fine in IE, but Fx seems to keep the cookie no matter what I do. And am I using the best code?
View Replies !
View Related
Database Has Been Deleted?
I have been developing my CMS for QUITE some time now, but in the 2 months I have been working on it the database has been deleted, not just wiped, but completely deleted. My question is, is there a solid way I can for sure figure out if it is an external source thats attacking the database through my CMS I am developing? So that I may fix the issue. Also if you would like to take a shot and try to find out if u can delete the database urself or if it actually is being done through/with the CMS check out.
View Replies !
View Related
Session Files Will Not Be Deleted
My problem: - i dont wan´t to destroy the session - i want that the session will be deleted by "php" when the gc maxlifetime parameter hits - i can turn this parameter on what i want - nothing will be deleted! - in my specail case - i make use of session_save_path - i use my own Could it be, that "php" doesnt delete session files in own session_save_paths ?
View Replies !
View Related
Help! Need To Recover Deleted Tables!
Im not sure if Im in the right place here but .. I am using a unusual combo of PHP MSSQL ODBC and MSAcess on a windows server 2003 box. All my tables in a database were deleted using the SQL "DROP TABLE" command. Can these be recovered? And if so, how?
View Replies !
View Related
Deleted Record Still Being Counted.
Can anyone see any reason why this query would not return the number of rows containing the correct "EID" "CID" where email address is "cs.com" or "webtv.com"..... for some reason it always returns 1 even if the database is empty. The only other flaw that I see is that I had a record that matched this criteria, then I deleted it from the database, but it still seems to want to count it for some reason. PHP Code:
View Replies !
View Related
Filling In For Deleted Images
I am creating an image gallary where the images are numbered 1, 2, 3 etc. Users will be uploading the images so if i need to delete an image, I need the code to be able to check if that number has been deleted and replace it with the next uploaded image. I have the code pulling from a txt file with a counter to name each file. The problem is that if images "36", "29" and "2" are removed... I need those slots to replaced in numerical order with the next uploaded images. So the next image will be named image "2" and will show up as the 2nd image on the page. Code:
View Replies !
View Related
File Automatically Being Deleted
Whenever index.php or .htaccess are created in a directory, they are automatically deleted. I'm guessing it is some kind of backdoor attack. Setting permissions to read only didn't help. Does anyone know how to see what is deleting the file? or protect it?
View Replies !
View Related
Info Deleted Itself From Database?
I got some info (news system) in a SQL database but after some days it deletes by itself it happened to me once but i thought i didnt remembered that i deleted it but today it happened again...it deleted by itself! lol I have other tables in the same database so its a table problem... How can i fix this? Did i miss something at the table configuration?
View Replies !
View Related
Checking For Deleted Images
I am creating an image gallary where the images are numbered 1, 2, 3 etc. Users will be uploading the images so if i need to delete an image, I need the code to be able to check if that number has been deleted and replace it with the next uploaded image. I have the code pulling from a txt file with a counter to name each file. The problem is that if images "36", "29" and "2" are removed... I need those slots to replaced in numerical order with the next uploaded images. So the next image will be named image "2" and will show up as the 2nd image on the page. Code:
View Replies !
View Related
I've Deleted Admin Username And Password,
I've deleted my admin username and password which was initially set at test. Now I can't log into my website as the administrator. How do I put Username and Password back so that I can set my own password and username again, log in to my website and edit it. Which file do I have to edit, and where do I re-set the Username and Password?
View Replies !
View Related
Updating Id Numbers To Be Consecutive After Deleted Some
I have a list of ip addresses that have accessed my web site and i have check boxes next to them so i can delete whichever ones i want. after i delete them, i want the name_id field to re-autoincrament after the other rows have been deleted. does anyone know how to do this? i know this line can set the autoinc to a new number, but how do i re autoinc the whole table?
View Replies !
View Related
Character Deleted And Mail Function
I use the mail function in order to send mail on a LAN Lotus Notes server (SMTP). I send big html mail with the "MIME-Version: 1.0 Content-type: text/html; charset=iso-8859-1" format. But, in the message, some characters are deleted, one for 10 lines. After a test, (message with 1234567890), a character is deleted approximately every 1000 character. Have you some ideas ? The problem is coming from php or Lotus Notes ?
View Replies !
View Related
Deleted Innodb Tables In Linux
I had some innodb tables and i deleted the files representing them from the command line in linux. so you'd think there would be no problem but not so, I try to create those tables again and mysql throws back an error "cannot create tablename.frm" or "table already exists". Anyway to repair the innodb data table?
View Replies !
View Related
Problems With The Data From My Session Not Being Deleted Properly
I am having some problems with the data from my session not being deleted properly. I have a shopping cart on my site and when the cart is emptied, the session variables are unset. I then find that when I carry on using the site, items keep getting put back in to the cart. It seems that the session is being emptied but the data is still stored somewhere else and then is randomly put back in to the session again without being told to.
View Replies !
View Related
Show The $message Text If In Fact A Record Was Deleted.
After a user confirms deletions of a db record they are re-directed to the main page again. That page should delete the record they confirmed previously and also show the $message text if in fact a record was deleted. Since a user can also come to this second page before deleting a record, the if statement shouldn't run in this case, or if does the $message variable should default to an empty string and display that. Here's the If statement I'm running: if ('$_POST[ID]') { $sql = "DELETE FROM $table_name WHERE ID = '$_POST[ID]'"; $message = "<p><font color="red" size="2">-- record deleted --</font></p>"; } else { $message = ""; } ........
View Replies !
View Related
Sync Directories - Check If Any Of The Files In The Database Have Been Deleted On The FTP Server.
I have a php script on a cron job running every half an hour that FTPs to a given server and downloads files, heres a list of everything it does: 1. Checks file names in the FTP directory with a database table 2. Downloads any new files and imports the file information into that table 3. Uploads all the information inside that file into a different database table 4. Deletes file on the local machine that was downloaded, as to not take up space Now, the FTP directory keeps a full 60 days worth of files which is about 8640 files, everything so far works perfectly, efficiently and doesn't need to be changed. However I want to add a function, in everything it does I want it to check if any of the files in the database have been deleted on the FTP server. As to have only the 60 days worth of file records in the table.
View Replies !
View Related
Fastest Way To Get Number Or Rows Of 500 000 Rows?
I am displaying the results 50/page of 500 000 So to get number of rows using select count(*) then do another select to get 50 rows out of 500 000 gets somehow slow.. When i tried to put the total count as fixed number and not executing that first select... it went so fast.. So i want to get number of rows by any other fast way! The number of rows can change anytime the user submit a form which can happen few times/hour.. Is it a good idea to make like crons job every 30min to calc the number of rows and keep it in another table, so that i just select it when i need it instead of doing full table scan everytime?
View Replies !
View Related
Reset Row "id's" After Arbitrary Value Deleted
Is there a way to reset the auto_increment value and all subsequent values for that table if you delete an arbitrary row? example: row 0 - test info row 1 - test info row 2 - test info row 3 - test info new auto_increment value = 4 I delete row 2, so table looks like: row 0 - test info row 1 - test info row 3 - test info the auto_increment is still 4, but there are only 3 rows in the table and the values are not correct. Is there a function or easy way to "reorganize" the row values and reset the auto_increment?
View Replies !
View Related
A "few" Old Session Files Never Deleted?
I have session files stored in a special tmp directory specific to a virtual host instance. The Max_lifetime is long 86400 (1 day) which I don't suppose is the problem. Anyway the sessions do indeed expire and "most" of the old session files disappear as expected. Not all however. I am finding several old session files with Unix last mod times weeks in the past. This behavior observed on PHP 4.2 and 4.3.
View Replies !
View Related
Session Files (text Files) Deleted After Sometime When User's Session End
In developing a recent project, I want to implement a feature, that certain query results will be written to a text file, after the user's session end for twenty minutes, the text file will be deleted automatically. I know in win/IIS/asp how to config this feature, but no idea how to do these in linux/apache/php. Php manual's session_save explain is not helpful enough. Anybody have such experience??
View Replies !
View Related
For Each Using Rows
Couldn't find this in the forum and so new I can't find a way to look it up in the my sql reference manual. I have a number of rows returned and I want to loop through the rows and extract the only item to use in building my menu. Code:
View Replies !
View Related
Rows Except 1st
I am utterly confused. I have an sql query that is returning all rows except the first record of the matches. PHP Code: <? $q6 = "select * from pictures where pictures.MemberID = '$_SESSION[MemberID]'"; $r1 = mysql_query($q6) or die(mysql_error()); echo "<input type=text name="caption" value="Enter Caption - e.g. At Club in LA" size=45 onClick="this.value=''"><br><input type=file name="images[]" size=20><input type="submit" name="s1" value="Upload"><br><br>"; if(mysql_num_rows($r1) > Ɔ') ...............
View Replies !
View Related
SUM All Rows
In the following code I have values in the eto_rpoints_lkup table that I want to match on team_id. These values have a rp_id of 1, 2, or 3. 1 = Fuel Point 2 = Manpower 3 = Munitions I need to SUM all the values for each rp_id for each team_id. Example on two records rp_id = 1 which means Fuel team_id is 127 for both records r_points for one record is 3 and the other is 4 So I need $fuelpoints to total 7 for that team. Code:
View Replies !
View Related
Add New Rows
Now I want to add a new row to a table, i.e, when I press the "Add" button, a new empty row will be shown under the current row. If I press the "Delete" button, a certain row will be deleted. But I don't know how to do that. Can anyone help me? I am craszy about the GUI now.
View Replies !
View Related
Rows In The Db
If I use $num = mysql_num_rows ($result); to show the results from the db, the figure I get is decided by the limit I have set in the mysql SELECT query. Is there another way to show how many records exists in the table, please? I mean, the total number of files in the db regardless of how may I draw out?
View Replies !
View Related
SQL Last Rows
I have a MySQL table and i have many rows. I have a column set_id now I want to do a query which will pull the last 5 rows in the table but each one with different set_id's ie if the last 6 rows were Row | Set_id 500 = 2 501 = 4 502 = 6 503 = 4 504 = 8 505 = 9 it would get the rows 500, 501, 502, 504 and 505.... as they have different set_id's how can this be done?
View Replies !
View Related
Num Rows
i have a code which is used to connect to database and get number of rows affteced from the SQL Query. when i run the query connecting to postgres DB it gives num row as 0, but when i run the query connecting to mssql server DB it gives num_row as 1. Below is my code. $conn = odbc_connect('server','username','password'); $sql = "SELECT * FROM clients WHERE client_code='*'"; $result = odbc_exec($conn, $sql); $num_rows = odbc_num_rows($result); echo "num of rows :".$num_rows;
View Replies !
View Related
Add Rows Together...?
In the game I've made I have added a function so that the members can create and join clans.. Now I want to create a ladder for the families but i cant figure out how to add rows togheter. I think it got something to do with loops.. the tiny piece of code I've got so far: $result = mysql_query("SELECT id FROM clans",$db); $info = mysql_fetch_array($result); $clanid = $info["id"]; $result2 = mysql_query("SELECT score FROM users WHERE tagid='$clanid'",$db); now what..?
View Replies !
View Related
Grouping Rows
I've gotten a few rows, that I want to sort based on the date that it's scheduled. This means that I've gotten different rows, and I want to create something like this: Monday 99 Januari: Row1 Row3 Tuesday 99 Februari: Row2 Row4 This way the system sorts the rows by date and groups them. Only I still haven't found any way how to do this. Any ideas?
View Replies !
View Related
|