Advertisement

07.19.2004 at 10:06AM PDT, ID: 21063657
[x]
Attachment Details

PHP MYSQL DELETE ROW (SIMPLE FOR MOST PEOPLE PROB)

Asked by ace5342 in PHP and Databases

Tags: delete, php, row, mysql

  CarNumber  int(1)   No  0                
   WhereFrom  varchar(225)   No                  
   WhereTo  varchar(225)   No                  
   Name  varchar(225)   No                  
   Date  date   No  0000-00-00                
   Cost  varchar(225)   No                  
   Time  time   No  00:00:00                
   JobNumber  int(11)   No  0                
   Finished  int(1)   No  1                
 
i need to be able to delete a user via a button that is echoed

if you could help this would be great

or a button that will make Finished = 0

also


$query = "SELECT * FROM Bookings WHERE Date=CURDATE() AND primary_key != '1'";

would this work


this is the code i have

$link = mysql_connect("localhost",NAME,PASS);
@mysql_select_db(easytwof_filers) or die( "Unable to select database" . mysql_error());

$query = "SELECT * FROM Bookings WHERE Date=CURDATE() AND primary_key != '1'";

$result=mysql_query($query) or die("SQL Error: " .mysql_error());

echo '                <table width="100%" border="1" align="center"  bgcolor="#33CCFF">';

while($row = mysql_fetch_array($result))
{
$CarNumber = $row["CarNumber"];
$WhereFrom= $row["WhereFrom"];
$WhereTo= $row["WhereTo"];
$Name= $row["Name"];
$Date= $row["Date"];
$Cost= $row["Cost"];
$Time= $row["Time"];
echo '               <table width="90%"  border="1">';
echo '              <tr>';
echo '              <th scope="col"><table width="100%"  border="1">';
echo '          <tr>';
echo '          <th scope="col">';
echo ' Car Number';
echo '           </th>';
echo '          <th scope="col">';
echo ' Where From';
echo '           </th>';
echo '          <th scope="col">';
echo ' Where To';
echo '           </th>';
echo '          <th scope="col">';
echo ' Name';
echo '           </th>';
echo '          <th scope="col">';
echo ' Date';
echo '           </th>';
echo '          <th scope="col">';
echo ' Price';
echo '           </th>';
echo '          <th scope="col">';
echo ' Time';
echo '           </th>';
echo '          </tr>';
echo '              <tr>';
echo '          <td bgcolor="#FF0000"><div align="center"  width="100%"  border="1"><strong>';
echo $CarNumber;
echo '               </strong></div></td>';
echo '          <td bgcolor="#FF0000"><div align="center"><strong>';
echo $WhereFrom;
echo'               </strong></div></td>';
echo '          <td bgcolor="#FF0000"><div align="center"><strong>';
echo $WhereTo;
echo '               </strong></div></td>';
echo '          <td bgcolor="#FF0000"><div align="center"><strong>';
echo $Name;
echo'               </strong></div></td>';
echo '          <td bgcolor="#FF0000"><div align="center"><strong>';
echo $Date;
echo '               </strong></div></td>';
echo '          <td bgcolor="#FF0000"><div align="center"><strong>';
echo $Cost;
echo '               </strong></div></td>';
echo '          <td bgcolor="#FF0000"><div align="center"><strong>';
echo $Time;
echo '          <td><div align="center"><strong>';
echo '          </tr>';
echo '               </table></th>';
echo '               </tr>';
echo ' <hr size="5" noshade> ';
++$i;
}


echo '               </table';
echo ' <br> ';
?>
</div>
  </div>

</html>Start Free Trial
[+][-]07.19.2004 at 11:00AM PDT, ID: 11585757

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]07.19.2004 at 11:22AM PDT, ID: 11585965

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]07.19.2004 at 11:49AM PDT, ID: 11586219

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]07.19.2004 at 12:28PM PDT, ID: 11586575

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]07.20.2004 at 01:58AM PDT, ID: 11590984

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]07.20.2004 at 05:48AM PDT, ID: 11592185

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]07.20.2004 at 06:47AM PDT, ID: 11592760

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]07.20.2004 at 07:22AM PDT, ID: 11593134

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]07.20.2004 at 09:27AM PDT, ID: 11594610

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]07.20.2004 at 09:35AM PDT, ID: 11594687

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zone: PHP and Databases
Tags: delete, php, row, mysql
Sign Up Now!
Solution Provided By: PatrickLucas
Participating Experts: 3
Solution Grade: A
 
 
[+][-]07.20.2004 at 11:52AM PDT, ID: 11596138

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]07.20.2004 at 12:44PM PDT, ID: 11596715

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]08.12.2004 at 01:13AM PDT, ID: 11781453

Experts Exchange has a courteous staff of administrators who help members get the most out of the website by means of administrative comments like this one.

Start your 7-day free trial to view this Administrative Comment or ask the Experts your question.

 
[+][-]08.12.2004 at 11:05AM PDT, ID: 11786550

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]08.17.2004 at 08:13AM PDT, ID: 11821440

Experts Exchange has a courteous staff of administrators who help members get the most out of the website by means of administrative comments like this one.

Start your 7-day free trial to view this Administrative Comment or ask the Experts your question.

 
[+][-]08.21.2004 at 11:11AM PDT, ID: 11860039

Experts Exchange has a courteous staff of administrators who help members get the most out of the website by means of administrative comments like this one.

Start your 7-day free trial to view this Administrative Comment or ask the Experts your question.

 
 
Loading Advertisement...
20080716-EE-VQP-32