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




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 Complete Forum Thread with Replies

See Related Forum Messages: Follow the Links Below to View Complete Thread
Recover The Agrument Names Passed To A Function Inside That Function? Possible?
Is it possible to recover the agrument names of the arguments passed to a function inside that same function?

example :

blabla($hehe, $huhu, $hihi);

function blabla($a, $b, $c)
{
arg_name($a) = "hehe";
arg_name($b) = "huhu";
// ...
}

Is this possible (agr_name is an imaginary fn)

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;
}
?>
....................

Get ID Of Deleted Items
I wonder if there is anything similar to "mysql_insert_id();"
for deleted/updated id's?

If i do a query and DELETE WHERE text_field="",
can i get the id's of the fields that were deleted?

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 ?

Deleted Php.ini And Cant Produce An Error
I deleted every instance of php.ini on my computer and restarted IIS. I was hoping i could envoke an error so I can figure out which php.ini it was using. But my application runs normally.

Copy() Deleted File?
I use this to upload boxart for games for my site.

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:

$_SESSION['data'] Not Being Deleted?
I got a login script that basically does that: checks wether username and password is in a mysql file and then sets the variable loged_in to 1 like that PHP Code:

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:

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?

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?

Generating Multiple Alternating Columns And/or Tables Within Tables
I am having a little bit of trouble generating the code for a table with 2 columns. The columns contain tables within themselves. Not sure why as that part was an existing design. Here is the output so far and it is correct but not how i want it to be (i'll explain) Code:

How Can A Line Be Deleted From A Text File
Since, I cannot seem to delete the last line in a text database using the code below.

What other way can I delete a line from a text file?

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?

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?

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 ?

Script To Access Expired/deleted Domains?
Does anyone know if there is a script available to access expired/deleted domains? If not, does anyone know how do you get access to the daily expired/deleted domains database?

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?

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.

Tables
I was able to get MySQL to output to an HTML Table with the following code. I was even able to add color to the columns. The following code causes the color to run vertical. Anyone have suggestions on making the color run horizontal? Sorry for the length, but you some might find this useful. Code:

Tables &
I would like to display some php output using the table in the first code. I copied the table I'd like to have it display, with the appropriate "$whatever" in each cell. Code:

SQL Tables
I am using php to create a form. I would like that forms
information to go into a database. When creating tables where the
information that i entered into the form will be stored, where exactly
do i place the code for creating the tables. Do I have to create a new
php file? and how do i link the information from the form to the
tables.

<html>

<title>Service Station</title>
</head>
<!--checks to see if all field are entered-->
<SCRIPT language="JavaScript">
<!--
function validateSelect(){
var errors="";
var form = document.customer;

var first = form.first;
if(first.value==""){
errors+="
You must enter a first name.";
}

var last = form.last;
if(last.value==""){
errors+="
You must enter a last name.";
}

var add=form.add;
if(add.value==""){
errors+="
You must enter an address.";
}

var city=form.city;
if(city.value==""){
errors+="
You must enter a city name.";
}

var province=form.province;
if(province.value==""){
errors+="
You must enter a province name.";
}

var phone=form.phone;
if(phone.value==""){
errors+="
You must enter the phone number's area code.";
}

var phone2=form.phone2;
if(phone2.value==""){
errors+="
You must enter the phone number's next three
digits.";
}

var phone3=form.phone3;
if(phone3.value==""){
errors+="
You must enter the phone number's last four
digits.";
}

var make=form.make;
if(make.value==""){
errors+="
You must enter the make of the vehicle.";
}

Tables
i want to select categorys from the table forumtutorial_cats and then it will select forums from forumtutorial_subforums where catid=the catid from the previous query. in a table it would list the category name then all the forums underneith it then it would list the 2nd categorys name and the forums underneith it.

it would keep doing thin until it didn't find any more categorys. i am not sure how i would get it to do this.

Tables Next To Each Other
I use this code to make a table with two rows, and four columns, all together.

<tr>
<td>top</td>
<td>top</td>
<td>top</td>
<td>top</td>
</tr>
<tr>
<td>bottom</td>
<td>bottom</td>
<td>bottom</td>
<td>bottom</td>
</tr>

How would I make it so that for each column, it displays one of the 4 most recent rows in my database? The most recent rows in my database can be determined because the row with the highest id (AUTO_INCREMENT) is the newest one.

I need to select the most recent 4, and display the most recent four on those tables. For "top", I need it to display " . $row['upload_preview'] . " and for the "bottom" I need it to display " . $row['upload_name'] . "

Any ideas how to accomplish this?

Question About Tables
I have what may be a simple question, but here goes anyway.

I need to split my data up into two columns, i.e.:

[data] [data]
[data] [data]

I need to do this while I'm looping through the database. I can't seem to figure out how to switch to the second cell while in the midst of the loop.

Two Tables To Sort
I have two tables. Table 1 has the following columns: id, number and headline. Table 2: id, number, description.

What I need to do is sort the rows from both tables to one page sorted by the field "number".

I had two solutions:
1. Two queries from which I create one array. The array can then be sorted with PHP's function. The problem with this is that a "number" can have the same value in both tables.
2. Creating a temporary mysql table, inserting the data there and then selecting it ordered by the number. The problem with this one is concurrent users. If the table exists already and another user starts shoving "his data" to the table it all gets messed up.

Dynamic Php Tables
As you'll notice, each new result appears in a new table, which is very annoying. I am trying to make it so that all ther results appear in 1 table.

This is what I have so far;

<?
//error message (not found message)
$XX = "No Record Found";
$query = mysql_query("SELECT * FROM $usertable WHERE $metode LIKE '%$search%' LIMIT 0, 30 ");
while ($row = mysql_fetch_array($query))
{
$variable1=$row["Model"];
$variable2=$row["Creator"];
$variable3=$row["Title"];
print ("$variable1, $variable2 ,$variable3");
}

//below this is the function for no record!!
if (!$variable1)
{
print ("$XX");
}
//end
?>

Can anyone help please?

Delete From Many Tables
I am trying to delete rows from a mySQL DB that consists of multiple tables. I am trying to use a function PHP Code:

Tables, Images, Php, SQL
I am setting up a page which displays thumbnails. I am a little bit confused on how to do this, so I'm going to ask you guys.

I want my thumbnails to be in a table, say about 6 thumbnails across because it creates a table row. For example

<tr><td>img1</td><td>img2</td><td>img3></td><td>img4></td><td>img5></td><td>img6</tr></td>
<tr><td>img7</td><td>img8</td><td>img9></td><td>img10></td><td>img11></td><td>img12</tr></td>

Each image in their own cell, 6 across before creating a new row. First a couple questions. How would I set up MySQL tables to do this? Add a <img src> in each row? How would I get only 6 to span before creating a new row?

How Can I Upload DB Tables
Anyone help me, I am new to this PHP and MySQL.
My Problem is In local server we will conect the database things using

mysqli_connect($host,$user,$pass) or die(mysqli_error($link));
mysqli_select_db($link, $db) or die(mysqli_error($link));

But in live server How can I upload or configure the database tables and all?

Getting A Query From Different Tables
I have different tables with product. Every tables is a different category, and has prod_id, name, description, price and already sold(int, how many already sold). I want to make a top 10 most sold products. For this is have to make a query from different tables, sort by 'already sold' and limit to 10, but how to do this? This all in mySQL/PHP3.

Tables (PHP > JavaScript > SQL )
I have encountered this problem, which my lack of knowledge doesn't allow me to solve.

The idea is to have table of one row and three columns, like this:

¦ "image" ¦ [url box to image (http://.../.gif)] ¦ "submit image" ¦

where:

1. In the second column url address to image is input manually by user.
2. By pressing "submit image" (.gif button), data from the second column is altered in SQL table and simultaneously "image" in the first column is reloaded to new value, that was just input in SQL table.

The idea is to reload only "image" in the first column and not the whole page.

I believe that the "image" should be located in iFrame, but not sure. Can anyone give an example of such a magic "submit image" button, that will do all procedure required without reloading the whole page?

HTML Tables
I'm new to php and i need ur help.

I have HTML table that is made form 4 columns and x rows.

I am wondering if there is any function that could get data from specific
cell into variable?

Example:

I have some variable $var and i would like to put data from some cell x,y
into that variable.

Can someone help me?

Matching Up Tables
I have two separate tables in my database - one with information and one with photos. I would like to link the two of these tables together. So when you go to an information page there is a small link that has a link to a photo for that fish. And vise versa when you go to the photos page.

The way I am going to have to link the tables together is by their scientific name. Because that is the only thing that they have in common. I tired something like this: Code:

Join 5 Tables
i need to join together 5 tables in a psql database i have made. the problem is that i cant seem to find the correct sql to perform the join. the tables i have are group, person, contacts, movements and treatments. group and person are connected by a group_id, established in group, each entry in the person table also has a group_id. the other tables are connected by person_number, established in person and a foreign key in all the other tables.

Changing Tables
I have my main index.php page and I've been looking around for the simplest way to do this but haven't been able to find anything that suits the purpose. Perhaps you guys can help, since you're the best..

All I want to do is switch the table that is in the middle of the page that displays the content of the page. So if someone clicks on, for example, index.php?files it'll change the table to the files table that I have in an html file or something.

Dynamic Tables
I am creating a dymanic website generator in php/mysql and I have a particular question. I have the following sql statement:

$sql = "CREATE TABLE one (
Email CHAR(50) NOT NULL,
First_Name CHAR(25) )";

and it works just fine. I need it to act dynamically and vary with different contents that are being submitted by a form. In short, I need the name of the table that is being created to be a variable and not a static name. Here is an example:

$sql = "CREATE TABLE $wstitle (
Email CHAR(50) NOT NULL,
First_Name CHAR(25) )";

Can this be done in any other way that the above example because it does not work.

Arrays And Tables
What I am trying to do is get the XML data from a newsfeed and place the itemid,time,heading,date,contents into database table. I'm nearly there with this but I am unable to get the itemid into the database. Code:

Generating Tables
I have a section of a web site that is for downloads of photography. There are seven different subject to view and I have these subjects and the corresponding URL's where their photos are stored in a mySQL database. I have no problems using the database to tell me how many photos are in the database, how many by subject, and even there names. I have been able to call them up and display them with no problems.

The problem I do have is I want to generate a table, 6 columns wide (736 pixel width as well) and have php add the photos to it - generating new rows of the table on the fly with the found set of photos it pulls from the database. I just do not know how to format the code to put in my while statements that when it fetchs all the rows in the found set to insert them into the cool table that I need.

My database name is Tphotos and the table is photos. I have defined the following fields as well - subject, photoname, alttext, lowressource, highressource. I pull the low res in first with alt tect and the link to the highres and open it in a different window.

Can't Post To Two Tables.
I have an input form which should post information to two tables. The first table is receiving the information, but the second one isn't. I have been looking at this for ages and just can't see the problem. Code:

How To Relate Tables
I know there is a "easy" way to do this but Im stumped and I hope you can help. I have 2 tables in mySQL. Table one is pages, table two is bb. Pages has a field in it call bb_id. I want to be able to show the corresponding row from bb with the appropriate page_id.

For some reason it will dispaly the data from the last row from the bb table. I've looked into joining them but Im new to PHP and had no success. Could someone explain how I'm supposed to these relate two tables?

Two Tables, Same Value, Same Select?
I have a two lists of people, (name) in two tables, and I want to give a bit long list of all these people. Below I have my current code, but its useless because its one list split in two, half way down you hit the As and Bs again! Code:

MAINTANCE OF TABLES
Anybody know a application write in php that across a database generate
a web application for maintance of tables?.

Tables, Frames, CSS Or?
I have been working with PHP now for a few months and would like some knowledgeable advice on laying out PHP based web pages. I have noticed that some web pages that use PHP also use frames...like phpMyAdmin for instance. This gives the page easier readability when refreshing (do to PHP code) as
the entries page does not update. But I was told many years ago by an elder that frames were not to be used...so what is the preferred layout for PHP pages?

Query Different Tables
I've got a DB with let's say 3 tables (each registered user has one)... and in each table there is let's say id, username, totalmoney, amountA, amountB... I also have one fix external paramter let's say "5"...

I need to query the different tables, in such way that I multiply 5*amountA, 5*amountB, add them both to totalmoney into a new variable let's say $totalwealth... then query the other tables and make an array with the $totalwealth values...

Can this be done, in a relatively short script or do I need to write one for each table, insert into a database and then compare?

Higlighting Tables In Php ?
can someone help me change the below table in php so that when a user puts their mouse over the table changes to a different colour?

Inserting Into Tables
I have a form that gets filled out and the data is stored in a DB.  I have a question regarding the insert part. Here is the structure of some of my tables: Code:

PHP And Html Tables
i have come across a problem that probably has an easy fix....I have a database for a product review form now everything works except that when i make an html table that i specify to be 500px in width and place the review data from the database into that table the words do not wordwrap instead it widens the table so that it is at 2000px or whatever size the text needs it to be.....i have been looking everywhere for a fix and have found nothing..

Repeating Tables
I am trying to create a image gallery based on a tutorial found on http://www.php-mysql-tutorial.com/image-gallery/ and I need to put image, title and desc in seperate rows so they are aligned and not wonky if one has more text than the other but can not seem to get it. Code:


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