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 Data From The Data Base


Im doing the PHP-MYSQL program to search the data in the database and display on the HTML Page. Everything is working fine till now. Now I want to know that, how to write program to delete the searched and displayed data from the database.....

I know the MySQL Syntax to delete data from database...Im not asking about MySQL programming. I want just an idea, how to do the delete process. Here is My full PHP script, Code:




View Complete Forum Thread with Replies

Related Forum Messages:
Why Opt For Photo Data Base?
Can anyone tell me what the advantage of a (say php) photo database over a
webalbum (just html) would be?

View Replies !
Data Base Connections
i just want to know what is safer when developing a site, opening and closing a connection to a database only when it is needed or leaving the connection open for the duration of the usage to improve the speed of the site.

if it is better to open and close the database connection all the time is safe to put the code into a include page as an object that can be created everytime the connection is used, with methods to open and close the connection?

View Replies !
Removing From Data Base
can someone give me the code i need to remove lets say an "article" from a database?

View Replies !
Simple Ads Data Base Mysql
I don't know if this question belongs here or in the MySQL forum, but I will cut it short and move there if PHP won't answer my problem.

What I have is a simple post your ad data base, currently the setup display all the table contents. I need to create a linked title or few words when the visitor click on it he goes to the full details of this post. Same like eBay ads, what is the best way to start this ?

View Replies !
Connecting To An Access Data Base
i want to connect to a Access data base but dont know how to do it. also how would u add more rows if needed and how would u write to the cells in the tables.

View Replies !
How To Connect To MySQL Data Base From My Pc
I've got an VisualBasic application that I want to connect to an mySql
database over det Internett, how do I do this? My app. is going to insert
data into my mySql database on the server to where I'm hosting my Website.
Must my webhost have to install ODBC on the mySql database?

View Replies !
Conecting To A Data Base !¿?!
which is the diference between conecting to a MY_SQL, and SQl, if my code conects to a my_sql can I change it to conect to a SQL?

<?php

$DbHost = "Escala-dc";
$DbDatabase = "Conocimientos";
$DbUser = "conocimientos200";
$DbPassword = "passconocimientos200";

mysql_pconnect($DbHost,$DbUser,$DbPassword) or die("Error de Acceso a Base de datos. Por favor contacte a un asesor");
mysql_select_db($DbDatabase);
?>

the $DbHost $DbDatabase $DbUser $DbPassword values are correct!

View Replies !
Session Or A 2nd Call To The Data Base
I am creating a form with data from the database and a user input field. I then send the info to a confirmation page I have tried to bundle the data into Session array to send to the confirmation page, I can't get the data into the session array, although the session does test true.

So instead I tried to do a second call to the database on the confirmation page but just end up creating a loop on my results. Code:

View Replies !
ActiveX For Data Base Entry WYSIWYG
I was wondering if the best way to create an editable WSIWYG interface where text can be bolded and formatted etc.

Do I need to use activex for it with php, or does php have any functions that can be used that are native?

I am guessing that I could do it with GTK but that means it has to be a desktop app.

View Replies !
Upload In Directory And Records In Data Base
I am needing to configure a code in PHP that makes UPload for serious directory and the register in Data base MySQL. Such as the resource of UPload of images of this GuestBook.

In the truth I already obtained some scripts ready in the InterNet, already I obtain to make the UPload of the archives of images for the directory but to record the register in data base it image to appear in the screen tá giving problem... Here it is the register that records in the bank: C:PHPuploadtempphp1281.TMP

View Replies !
Order BY Search The Data Base For All Object
I have a DB where object data like width, length and height are stored. I am able to search the data base for all object where width=X, but in cases where there are multiples, how can I also sort by the height?

Width Height
25.4 10
25.4 11.5
25.4 14
25.4 25.4
etc.

View Replies !
Query A Data Base With A Search Button
I want to query a data base with a search button the code:

$search = $_POST['%search%'];
$metoad = $_POST['metoad'];
$XX = "No Record Found";
$query = ('SELECT FROM `accom` LIKE '%$search%' LIMIT 0, 30');
$result = mysql_query($query) or die('Query failed: ' . mysql_error());

View Replies !
Array Sorting Data Base Of Countries
I have a data base of countries which is sorted in the result query

$SortOrder = "ORDER BY `SortOrder` DESC, `Name` ASC";
$SqlRes = dbRes("SELECT * FROM `GeoCountries` WHERE `ID` >= 1 {$Approved} {$SortOrder}");

Normal usage is I dump this into a Select list like so Code:

View Replies !
Secleting From A Data Base And Ordering By Views
When getting data from a database I’m ordering them by the times it has been viewed descending, but the problem I am having is it is only selecting by the first number EXP.

Its ordering something like this
7, 4, 4, 2, 14, 12, 10

When I’m wanting it to be like..
14, 12, 10, 7, 4, 4, 2

You get the idea.. But as I said it’s selecting by the first number only. Here is the select code I am using.. Code:

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 Data
i try to delete the data by hit the delete button. but no changes. here i submit my coding.

PHP Code:

<?php
if (isset($_REQUEST['delete']))
$select ="DELETE from details where amount = $nt[amount]"
?>

View Replies !
Delete Data In Flatfile?
I know this is a total noob question but im just getting into flat file scripts because a friend of mine has a site that does not have a database. so i told him ill try making him a news script made with flatfile so he doesn't have to switch hosts.. but my question is..

is there a way to delete data thats in flatfile? like set them in an array or something?

View Replies !
Delete MySQL Data
I am building a lunch ordering system for a company. The employees can login, order lunch, and the administrator can see what everyone ordered for lunch in the admin panel. The problem is that when the employees enter data, it stays in the database until they update it. If an employee is sick, their lunch order from the previous day is still in the database. Is there a way to clear those values they enter at a certain time in MySQL.

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 !
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 !
Insert, Delete, Update And Query Data Via DBX
can someone guide me how to connect to mysql using DBX and whats the syntax on inserting, delete, update and query data.

View Replies !
Listing Table Data With An Option To Delete Each Individual Item.
Was wondering if anyone could help me with a PHP, MySQL problem. I am
completely new to PHP and MySQL. I have been trying to find a way to
list data from a table on a web page and after each individual item
have a hyperlink to allow users to delete the information listed. Can
anyone help?

i.e.
Name Age Sex
------------------------------------------
Adam 21 M delete
Betty 22 F delete
Chris 23 M delete
Daisy 24 F delete

------------------------------------------------------------------------------------------------------------------------------
(delete after 'Sex' would be the hyperlink to delete that entire line
(row) from the table).

View Replies !
How To Use Http://www.mySite.com/test/ As The Base Domain (base Href)
how to use http://www.mySite.com/test/ as the base domain (base href)

with links relative to the site like this:

<a href="/faqs/overview.html">

Can mod rewrite do this?

View Replies !
Simulate Send Data With POST And Get Data From A Web Page (whith A Session)
I'd like to get text of a webpageB that I reach by putting
a login and a password in a webpageA.

I mean:
I'd like to get text of a WebPageB with a php script.
But before I can see WebPageB I have to autenticate myself
in a WebPageA writing my login and my password in a form,
the host recognise me and (by session) let me see the WebPageB.

The question is:
1)how to simulate send data (login an password) in form with a PHP script?
2)how to navigate in a Web usin the same session?

View Replies !
Pull Data From Mysql From A Varchar Field With Comma Seperated Data
I'm trying to pull data from mysql from a varchar field with comma seperated data, like: test, test, test, and so on. when I try to display the data i just get "array" in the input field. what i'm wondering is how can I show the data correctly? I'm a little lost here.

View Replies !
Problems With Reading Data From A Text File And Inserting The Data Into DB
Ive been having problems getting this to work for 3 days now. Basically what im trying to do is read from a text file and insert the information into mysql. The text file is in this format:

"LuCyndi@infiniti.com","carol","kellerhals","109 veeder dr","las vegas","NV","89128","702-254-2061","45"
"the_prophet@att.net","a.","cohen","6794 e. bonanza rd","las vegas","NV","89110","702-463-6569","55"

I understand how to open files to read but im having problems turning each set of data into an array so i may insert it into mysql. If someone could please help it would be appreciated.

View Replies !
Retrieve A Data From My MySQL Database Using PHP And Save The Data In A Variable
How can I retrieve a data from my mySQL database using PHP and save the data in a variable in in my PHP code for example i have this table in the database

First name           Last Name
   Juan                  Punkista

I would like to store 'Juan' in variable $first and 'Punkista' in variable $last.

View Replies !
Is It Data From The TEST Or From PROD And Will It Be Data From Database1 Or From Database 2?
<?php

I have a question about 2 connection strings to a ms sql database.

# TEST DATABASE

$connecttest = MSSQL_CONNECT("TEST", "sa", "123456") or exit("Unable to
connect to MS SQL Server at 10.0.10.58");

$select = mssql_select_db ("database1",$connecttest) or exit("Unable to
select database TEST");

# PRODUCTION DATABASE

$connectprod = MSSQL_CONNECT("PROD", "sa", "654321") or exit("Unable to
connect to database at 10.0.10.59");

$select = mssql_select_db ("database2",$connectprod) or exit("Unable to
select database PROD");

$SQL = "SELECT * FROM table1";

$RESULT = mssql_query($SQL);

// What data will i find here? Is it data from the TEST or from PROD and
will it be data from database1 or from database 2?

?>

View Replies !
Use Sessions To Store Data And Use That Session To Get Query Data.
We have some Java programmers in our software dev, and they are
pressuring us to use Sessions to store data and use that Session to get
query data. They say that it is ok since it is like Entities in Java. I
am baffled as a .NET programmer, we tend to avoid using sessions and
instead use DataSet, is there any equivalent of dataset in PHP?

View Replies !
To Update Data - Reqiures Verify Existing Data?
i have a table with 7 writable fields. i've already populated column1 w/ data. so, 6 fields in each row need updating.

the data in field #1 is a "unique identifier" code, but not the auto_increment field, and therefore should NOT be updated along with its row's neighboring cells.

this "unique Identifier" column is used as a human-friendly reference-point for sifting through records in the table via HTML select dropdown box, and its value should remain static once entered into the db. Code:

View Replies !
Using MS Access To Hold The Data And PHP To Collect The Data From The Database
I am using MS Access to hold the data and PHP to collect the data from the database and display it on a website. I've got the results displaying in the normal way with data being displayed in a linear manner e.g. Code:

View Replies !
Comparing Data In Two Tables To Find Missing Data
I have a small web site where people can register and create an account, and then add links to our site.

I have two tables set up. One holds registration data -- user_id, username, password, date registered. The other holds link data -- link_id, user_id (to track which registrant added which link), and URL.

Some people have created an account, but have never posted a link. I'd like to figure out who those folks are but I'm not quite sure about how to do that.

If I did this manually I would get a list of user id's from the registration table and then look at the link table and check off user id's in that table. The unchecked user id's are my target group.

View Replies !
Comparing Form Data To Mysql Data
Im interested in building a script that would take form data, a variable like an address, and compare it with a known address in a mysql table (called addresses), then if there is a match log the address information in a separate table called (addresslog), and return the visitor to a certain page. If there is no match between the address entered in the form and known addresses then the information is still logged into the addresslog database but the visitor will be sent to a different page.

I'm still new to this, and am working through the logic and the syntax, but I believe I'm close. It's still not working, I have all of the proper tables, maybe I'm way off with the coding so I thought I would seek out some expert advice. Here's the entire script with as much explanation as I could give. PHP Code:

View Replies !
Data Type Change Without Loosing Data
I have a problem in mysql. I stored a date in  08/14/2006 format and choose a datatype longtext now i want to store date in 2006-08-14 form is it possible to do it without loosing data in db when i convert datatype longtext to date the data lost. Any solution?

View Replies !
Showing Data From Data In Specific Interval
i will make a banner system to my website. there is some information in the database i get out with to my site. that is pasteing the data in random way. i have a date with day-month-year and a time .. hour:min. how do i do in my code so its is displayed in ex 1 month from that day it is acceptet. give me an example to how i could do it.

View Replies !
Data Mining / Data/Website Scraping
I'm looking for a piece of software or coding that will let me post a
form
to another URL, accept the response, search it for a specific
"success"
string and then let me continue processing the rest of my program.

I want to accept queries on behalf of my supplier, forward it to them
behind
the scenes, accept their response and display it within my website.

Has anyone had any experience with this? Is there a simple, basic
utility
to let me do this?

I was kind of hoping I could avoid developing it myself.

View Replies !
Possible To Pass And Display The Data Before Some Of Data In Processing?
possible to display the data before some of the data still in processing in server?

I had one page that peform the calculation with more that ten calculation of huge numeric of data and compare between each other. when the user insert all the data and pass to the server, isnt possible we display other data to the user and after the compare process had finish just display the result to the user?

possible to do that? other had other more efficient way to do that?

View Replies !
$_SESSION[] Not Holding Data After Submitting The Data
I'm using $_SESSION[] to store some information, but after I submitted the data using form, the data stored in $SESSION[] disappeared. What could be the reason? Code:

View Replies !
How To Trim Data , Data Retrived From Mysql
I am retriving data from MySql database into table.. the width of the table is 281 so small so i wanted to cut the text say eg. : Today Mr. X-Men is visiting Thimphu for his lates show off movie traillers. I wanted to trim it in this formate : Today Mr. X-Men is visiting Thimphu for ... The rest of the data i can hyperlink this sentence and show it in the another page.. Just like the Yahoo News for ur kind information.

View Replies !
Pull The Data Directly From A Data Feed
I am currently building a site that would be easier if i could pull the data directly from a data feed. ButI'm new to PHP and I don't know how to create a bit of script to do this.

View Replies !
Trouble Appending Data Onto The End Of Form Data
I have a textarea in an html form. Users list items in it.

item1
item2
item3

I then process the form data in php so that a "-" is appened at the beginning and end of each line. Code:

View Replies !
Extracting Data And Syncing Data From 2 Different Databases
Here is my problem. I need to sync up data from 2 separate databases. The data in the first database is stored in one column, here is an example of the data: 3214, 3478, 3100
These number are the idProduct Primary Key from the Products table of the second database.

I need to separate the numbers the coma is the delimiter. each 4 digit number is a different product number from the second database. The site is currently done in ASP and access database. I converted the databases to mySQL and redoing the site in PHP. Code:

View Replies !
Comparing Database Data And New Data
I am trying to create a PHP script that reads in a file, parses it for the data I want and compares it to the data I have in a database.

The data is points and ranking information for a Folding@Home Team.  Every week someone creates a news item with points gained by each team member for that week and other info.  This is done manually and takes a lot of time.  I hope for my script to automate as much of it as possible.

The script was to run as follows:

Download and parse latest statistics into 2D array
Compare usernames in array to usernames held in Database
Any new usernames and their respective points/rank to be added to database

Compare points in 2D array of each user to those held in database.
Output username and points gained

I thought I had a working script until I actually tested it on real data, and realised I missed something rather obvious - the order of usernames from the parsed file is not going to be the same order as in my database - due to people moving up and down the ranks.  So i can't just get a recordset from the db and run a simple loop to compare it to the parsed data.

I am not sure how to go about comparing the database information with the parsed data that works around the fact the data could be in any order.  The only thing i can think of is:

foreach item in $parsed_data_array
    query database for $parsed_data_array=>username
        if(number of results == 0)
          build new insert query for current username
        else
          continue

I don't know if this works [haven't tested yet] but I can't help feel it is a little DB intensive.  There could be up to 200 queries being sent to the database.  This can be minimized by adding extra criteria, like ignoring inactive users of course.  Is this a viable solution or is there a much better way of doing this?

View Replies !
Retreiving Data And Maintaining Data
I am trying to add data to a table in oracle but get

Warning: ociexecute(): OCIStmtExecute: ORA-00936: missing expression in /homedir/ilex-s02/mrace/public_html/addnewemp.php on line 18

here is the PHP script i am working with, Can anyone see any faults with it? Code:

View Replies !
Retrieving Data - Strip The Data
This shouldn't be a complicated solution but it's somehow beyond me at the moment. There is a php script on an external server that is writing javascript document.writes that we are supposed to include in our html files.

However, we don't like the layout so I'm trying to strip the data we don't (shouldn't be a problem) but for something reason I can't get php to read it. It's not a php problem, it's just I'm doing the wrong things.

I tried

$sitedata = include("link.to.file");
echo $sitedata;

That didn't work. What's the right way of getting the data into a php variable so I can begin editing it?

View Replies !
Grouping Like Data While Looping Through Other Data
I have a mysql query that returns quite a bit of data that I need formatted and displayed in a web browser. While I can get each row displayed on it's own with a while loop, I need to group the redundant data while still showing the relevant per line data in each group. Code:

View Replies !
How To Insert Data Into One Form ,the Form Include 2 Table Data In Database
i had create a form and i want to insert the data, but my form was include the data from 2 table , wat will be the query looked like, can somebody give me the example ? How to do it?

View Replies !
Save Form Data - How To Temporarily Store The Form Data Of Page 1
i have separated a form into 3 separate php pages as step 1, step 2 and step 3. i would like to know how to temporarily store the form data of page 1 when the user is moving onto page 3 after completing form 2 on page 2?? then retreive and send the data of all 3 forms together in one email to the webmaster when the user clicks submit on page 3 after completing the 3rd form as well as the previous 2.

View Replies !
Preserving Form Data Prior To Processing The Form Data.
I have a form that will be preserving form data prior to processing
the form data. Upon clicking a certain submit button you will go to
another PHP script that will contain the following code:

View Replies !
Get The Data From Those Rows That Have Data
Hi Guys,
If i were to have the following php query:


$query = "SELECT * FROM alist WHERE list_id = $id";
$result = mysql_query($query);
while($row = mysql_fetch_array($result)){
echo "<b>{$row['List_Name']}</b><BR>";
echo "{$row['address']}, {$row['state']}<BR>{$row['post_code']}<BR>Tel: {$row['phone']}<BR><BR>";
echo "{$row['Info']}<BR>";
echo '</blockquote>'

....how can i get the data from those rows that have data.
For example, some rows won't have a 'phone' value so i don't want this to display "Tel: " if there is no value associated with 'phone'.
What do i need to add to my script inorder to achieve this?

Thanx...

View Replies !
Posting Form Data And Also Allow To Download Form Data
i have a client that whats to post form data to a database but he also wants users of the script to download it aswell how will i got about doing this i thought about it that i could make it save it into a txt file then echo the download link is there any ideas? because to post it to a txt file it would be posting 2 places is there a way to do this? Code:

View Replies !
Switching Mysql Data To Mysql Data?
I've been using wamp5 for about a year or so and I grew tired of it so I uninstalled it and went for a fresh install of apache2, mysql4, php4 and phpmyadmin.

Before I uninstalled WAMP5 I backed up c:wampmysqldata so that I could keep all the database files. My question is, is it safe to just move all of that data into my new mysql installation c:mysqldata ?

I did try this with one small database I had, and I could access it with my new phpmyadmin installation. But I was just wondering if it is an acceptable solution.

View Replies !

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