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 All Records Starting In R


PHP Code:

$result2 = mysql_query ("DELETE FROM r_CompTables WHERE CompID = R??") or die("DELETE error: ".mysql_error());

I have this code but I want it to delete anything start in R. R will be followed with a number so it could be R5 or R91.




View Complete Forum Thread with Replies

See Related Forum Messages: Follow the Links Below to View Complete Thread
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 !
Records Won't Delete
mysql_query("DELETE FROM guestbook WHERE id = '$recnum'"); It works fine on my local server but it doesn't delete records on the remote server. any ideas?

View Replies !
DELETE Records
I am going to write a php script to delete some records based on values supplies by the user. I was just wondering if the query is correct but there are no records to delete for example if this query was executed but there was no testId 7, would an error occur or would the query be performed but just not delete any records? PHP Code:

$testId = 7;
$q="$q="DELETE  FROM test WHERE testId = $testId";
mysql_query($q, $link_id)or die(mysql_error());

View Replies !
Wants To Delete Old Records
I want to delete records that are more than 7 days old($keeptime). I am new to this and can't figure out the correct code. The table is called 'x4tables' and the field 'tdate' is a timestamp. I have used: Code:

View Replies !
Delete Records Since A Week
I've been trying to delete records since a week and i'm not able to do it. Before with this script, i was doing so many things at a time and i was confused.But, now, i just displaying the records from a table N trying to delete them.Would somebody pls guide me.

I just wanna set the delete flag(i.e, i want to set the RBS_DELETE column to Y or something) when i check a check box to delete it. I've some 5 records displaying on my form and i want to check 3 of them and when i check them and hit submit, i want the RBS_DELETE column to have some value. PHP Code:

View Replies !
How Do You Delete Records From Mysql
Could someone please show me how to delete records from mysql. Maybe even an example in a loop that deletes records based on a criteria.

View Replies !
Delete Records From A Table
I have a table its called queue. It has a field called id. I want to delete all records in the table apart from the ones with id equals to 74 or 75 or 87. How do i do that?

View Replies !
Forms To Delete Records
I am trying to make a PHP script that displays all of the records from a database, then allows a user to edit or delete the records via a form. I need a checkbox beside the names and a text field with a number beside each name. Is there a way to make it delete all names with a check beside them and update all number that have been changed when the user clicks submit?

View Replies !
Delete Records From Table 1
I have a script that doesn't delete records from one database when it should, and now I have to do this myself because database is big and causes problems on the server. What I have is:

TABLE 1, field auction
TABLE 2, field id

so I would like to delete all records from TABLE 1 where the value of the field auction doesn't match the value of the field id in TABLE 2. Can someone help me on this, please? I need to get this database cleaned.

View Replies !
Delete Specific Records
On clients machine, currently to delete on trainee record it runs 10 queries to delete records from 10 tables. At the time of running all queries, server shows (104) Connection reset by peer. An error condition occurred while reading data from the network. I think it because of running 10 queries at a same time. Is there any possibility that through one line of query we can delete record from 10 tables. I've tried following query

DELETE FROM table1, table2, table3, table4, table5, table6, table7, table8, table9, table10 WHERE empID = 11;

But it gives ' error in query.

View Replies !
Delete Records Older Than 14 Days
Does anybody know how to make a script that automatically removes mySQL records older than 14 days?

View Replies !
Want To Delete The First Letter In A Column With 275 Records
table : product
column : code

in this column i have 279 records with bv. S1092734 i want to delete the first letter in all those records.

View Replies !
Delete Fixed Number Of Records
i have a table with one field. this field saves times as records. i want to there are 40 recoreds always. in other mean when inserts 41'st record then 1'st record be delete
how to delete fixed number of records at a time of first of my records asc (like select).
in other mean i want to like: delete from table order by time asc limit 0,1

View Replies !
Delete Selected Records From Table.
Can anyone see why this connection doesn't work? It's suppose to delete selected records from my table.

<?php

if (isset($_POST['delete'])) // && isset($_POST['delcus']))
{

foreach ($_POST['delcus'] as $val)
{
echo "$val";
$conn= mysql_connect( "localhost", "user", "password" );
$sql = mysql_select_db( "snow" );
$del = mysql_query("DELETE * FROM request WHERE qid =" .$val);
//$rows = mysql_num_rows($del);
$rs = mysql_query($conn, $sql, $del);
if($rs)
.........................

View Replies !
Multiple Delete From A List Of Records
If I have a list of records from a database on the screen, each with a check box beside them, how would I delete all the records that have been ticked? I assume I would use a variable similar to checked[], but not sure what syntax I would use to remove them from the database? Would I loop round each record comparing the checked[] value and it it's set, delete the record?

View Replies !
Do A DELETE Statement To Remove Any Records That Don`t Match.
I`m just trying to figure out the best method to delete my records and wondered if it was possible to do a DELETE statement to remove any records that don`t match. Here is my code so far:

$Query="select blah its huge:-)";
$RESULT=mysql_query($Query);
$my_rows=mysql_num_rows($RESULT);

for ($a=0; $a<$my_rows; $a++){
mysql_data_seek($RESULT, $a);
$Array = mysql_fetch_array($RESULT);
printf("%s<BR>", $Array['Email']);}

My Query returns Matched Records, what I would like to achieve is deletion of the records that didn`t match, would it be possible to do that under the printf statement. So delete all the records in the table that don`t match up to $Array['Email']??

View Replies !
Delete Option From My View Records Page
I have a list of things I need to do with my database - but this is my next hurdle - the delete query within my view records page. I want to be able to click on a button or link to delete a record in a table. I was envisaging that each record would have a delete button or link next to it and clicking that would remove it. Here is the script I have created to view "Devices": PHP Code:

View Replies !
Delete Records And Files In 1 Statement At Same Time?
How can i delete records and files in 1 statement at same time?

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 !
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 !
Auto Delete The Old Records But What If Server Clock Was Set Up Wrong In Maintenance?
I want auto delete any events that the event date is at least 1 day older than current date. No problem for the php programming. get the current data (server clock), check the events date and delete the old records. My problem is that for some very rare cases.

Say if for extrem cases I have 1000 new events saved in database. But somehow, I or the the hosting company do the server maintenance, and reset the time clock of the server, in case in the maintenace, the server time clock was set up wrong say 2005, was set up as 2006. Code:

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 !
Displaying Priorty Records And Normal Records In The One Dataset.
I have a page which displays the records from the database and uses paging to display the records in groupes of 10 per page.

I now want to be able to show results depending on the database field (display) in the database (can be set to either "full" or "limited"). If the record and the field display is equal to "full" i want to then display this record at the top of the record set and display all the fields.

If the record is equal to "limited" i want to display different results and they must show after all the records which are equal to "full". I can't output two different recordsets as i use paging and only want to show 10 records per page. Code:

View Replies !
Displaying Multiple Records And Want To Be Able To Update These Records With Different Values.
I am creating a page where I am displaying multiple records and want to be able to update these records with different values.

View Replies !
Starting .net
I require suggestions on how to get friends in the group to communicate
about the programming in .net and php etc.

View Replies !
Starting Out
Most of the messages in this newsgroup are specific problems or
questions. I have been scripting in mirc for a while so i have the
programming basics down but i was looking for your suggestions on
where to start with php.

View Replies !
Starting Php
i'm going to learn and implement php simultaneously. i'd like to know about useful links/resources about php available in booked formor online. i thought it would be effective if i get guidence from group before wandering around net.

View Replies !
Problems With The Listing Of Records, Editing Of Records
I'm having problems with the listing of records, editing of records, and deleting of records. I'm not sure what I'm doing wrong.

The listing script is calling the add entry script. So I add the record, the database is updated, and nothing else happens. I don't get a list of records from that table.

When I did SQL programming off the mainframe, you did a simple select statement. I'm not sure why the PHP list script is calling the add entry script. Code:

View Replies !
Starting Out: PHPLIB ?
Are there any tutorials out there that detail how to use PHPLIB? I've read through the documentation, but it seems a little bit over my head.

View Replies !
Starting A Session
I have the simple code: PHP Code:

View Replies !
Starting Executable
I am trying to figure out how to get the CMD (dos) window to come up when I
call a executable. I have this working on a Win2000/apache machine and am
trying to use the same code on a identical machine.

Here is how I start the executable. It is initiated from the browser on the
machine itself:
pclose(popen("start " . $exe . $params, "r"));

What normally happens is a cmd window pops up showing the executable's
output to screen. My php code then gets the PID for the executable by
running a tlist.exe and searching for the name of the executable. I take
this PID and sleep till a certain time and then kill the executable.

When I do it on the new machine the executable runs but no cmd window comes
up. I also cannot get a PID for the executable because tlist output shows
the executable's PID but has no information about it. When I manually use
Tasklist I can see the name of the executable.

PHP and apache are setup identically on both machines so it must be
something in windows. From looking around I think it may have to do with
'apache not interacting with the desktop' ?

I need to have the cmd window come up and I feel if I can get that
accomplished the PID problem will be taken care of too.

View Replies !
Starting A Php Script
why is it some people use <? and others <?php ??

View Replies !
Session Not Starting
I am new in PHP. i am trying to start a session with

<?php
session_start();
?>
It gives me error:

Warning: open(/tmpsess_240edf6126abb0b892d4365f6348326d, O_RDWR) failed: No such file or directory (2) in c:phpdev5wwwpage2.php on line 2

Warning: open(/tmpsess_240edf6126abb0b892d4365f6348326d, O_RDWR) failed: No such file or directory (2) in Unknown on line 0

Warning: Failed to write session data (files). Please verify that the current setting of session.save_path is correct (/tmp) in Unknown on line 0

I changed the path in php.ini:
session.save_path = C:phpdev5www

View Replies !
Starting Tutorial
I have the php & mysqul for dummies books and have found a few old tutorials. I thought I'd ask if anyone knows of an up to date tutorial for installing apache, mysql, php in order to get a web site up and running.

View Replies !
Starting With XSLT
You can see that the specific complaint is blank ('') when I get this error. The first line of my xml file is:

<?xml version="1.0" encoding="UTF-8"?>

Which I gather is pretty much a standard.

I'm using a prefab script which gives me this output when I try to convert the XML file:

Something bad just happened. Here's some more information:
msgtype --> error
code --> 69
module --> Sablotron
URI --> http:/doc/dtd/StoreExport.dtd
line --> 1
msg --> unknown encoding ''


Any ideas where to start troubleshooting?

View Replies !
<? Vs <?PHP Starting Delimiter
I often see the former starting delimiter rather than the latter. Is there some rule about where the former can be used?

View Replies !
Starting A Project
I am working on a project where there are 6 main pages. I need to create a system whereby certain employess can login to PHPMYADMIN and dynamically update page information and maybe even create pages. I want to know if it would be more efficient to make tables for each different sub-directory (which contains page id's and page names) or if it is more effective to build one table that somehow references these sub-directories.

View Replies !
PHP Sessions Starting To Fail
we have a fairly busy server and we just started to have
problems with PHP sessions failing. We've never had this problem before and
to be honist, out server traffic is lower than it has been in prior months -
so I'm really not sure what could cause this.

Could anyone suggest some potentiol avenues to explore for reasons that
could cause PHP sessions to fail?

View Replies !
Starting Application In Background
On my main page I have several hyperlinks which point to a php page that plays different .wav files. In the play_sound.php page I just echo the .wav file and when the link is clicked in the calling page the browser (IE6) opens Winamp and plays the sound (since I output a header with Content-type: audio/wav).

It works great but is there any way to open the application in the background or at least minimized so you don't see it over the top of the main page?
Is it a setting in HTML that determines this or does it have to be done through php?

View Replies !
Starting & Stopping Httpd
What i want to do is to fire the functions in the httpd script to start, stop, restart, httpd for eg. from the console i would write ( from the init.d dir.)

httpd start. to start the Apache server. but how do i do it from a php script? I can open it with fopen().

View Replies !
Starting PHP, Netequite Question
I am learning php an I am amazed how easy a PHP noob like me can acheive
so much in little time.

I am planning to take part in the community and noticed these 3 newsgroups :

-alt.comp.lang.php
-comp.lang.php
-alt.php

Do these groups differ in purpose or is it allowed to crosspost in all 3
of these?

My guess is that my newsserver gets access to these 3 ones but other people
maybe can read only 1.

View Replies !
Remove All Lines Starting With B
Say I have the following file - dummy.txt:

a 4treg
a sdfas
a 4egdsag
b 1111
a ergdsfg
b 1111
c waefasdf

How would I go about removing all the lines that begin with a b? I
thought the following script (which I wrote with the intention of
replacing all such lines with the empty string) would but apparently it
doesn't:

<?
$contents = file_get_contents('dummy.txt');
echo "";
echo preg_replace('/^b.*?
/','',$contents);
?>

View Replies !
Starting File Download
Is there a way to make a browser start downloading a file, automaticly, no matter what type of file it is?

View Replies !
Starting A Process On The Server
after putting my self through hell trying to call an executable with Java. (which I was doing correctly according to the specs, but there is something f$#%ed up with the implementation of Runtime.exec() on this OS--Linux for those of you who are wondering, when I recomiled everything on NT it runs as expected, which is unfortunate)

Anyway, I was just curious, since I haven't really taken PHP very far, and haven't played with it since PHP3, what would one do to call an executable on the server file system? with arguments?

View Replies !
Values In Graph Not Starting At 0
I'm on a mission to dynamically generate stock quote line graphs. Stock quote graphs are usually very dramatic looking, even if the quote price changes slightly throughout the day. This is because the bottom label on the vertical side of the graph starts at an even increment just below or even with the lowest stock price of the day, instead of 0.

I'm getting close to making this happen for my project, but am not there yet. There may also be a better way to do what I'm doing? Sometimes my values fit within my labels. Sometimes my lowest value falls below my lowest label, which would make the line in my graph go below the chart. I'm sure that would make a bad impression on my client's investors. Code:

View Replies !
Error When Starting Apache
I have an error when starting apache under win xp like this:

cannot load c:/php/sapi/php4apache.dll into server: the specified module could not be found

the fact is I have c:/php/sapi/php4apache.dll module exist.

View Replies !
Starting Anew: OOP? PEAR?
I believe I can write basic procedural code but:

1) Should I be using the OOP method as much as possible (meaning I would have to crack the philosophy, too) ?

2) What about PEAR - is it something like CPAN in perl (I use perl now) and should I use it to shurtcut the development?

What I want to write is an application to do specialized reservation of multiple resources over time. The database model (E/R) based on the business needs is ready.

I would be gratefull just for being pointed to unbiased but focused information. I am not much interested in the Computer Science theories, I am interested in the practical php experience.

View Replies !
Starting Image Host
I am looking to start an Image hosting site to compete with imageshack. I need to know what this would entail, the level of difficulty, and if there are possibly any open source codes i could use.

View Replies !
Starting Up Using A Simple Database
Is it possible to create a table/array in a php-file and then collect data from it into another file by clicking a hyperlink..? I've never setup a database before. Some say I have to use MySql, Oracle and so on. In other terms.

Is it possible to make a database (simple table) in a php-file and then make a query without using mySql, Oracle and so on ? How could this easily be done (fetching data from an table and then preview the info in another site when clicking a hyperlink)?

View Replies !

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