Forum Moderators: coopster
<br>
<input type="submit"></form>
####
that feeds the following query
####
<?
include("dbinfo_fortest.inc.php");//db conn script
mysql_connect($host,$username,$password);
@mysql_select_db($database) or die( "Unable to select database");
$query="delete * FROM articles_trial where adate between '$date_start' and '$date_end' and sectionID='$section_id'";
mysql_close();
?>
####
It has no effect on my db trial
do you see any wrong doing
thank you
regards
<?
include("dbinfo_fortest.inc.php");//db conn script
mysql_connect($host,$username,$password);
@mysql_select_db($database) or die( "Unable to select database");
$query="delete * FROM articles_trial where adate between '$date_start' and '$date_end' and sectionID='$section_id'";[b]while ($row = mysql_query($query)) {
// processing here
}[/b]
mysql_close();
?>
Also, I'm not sure, but I never use the asterisk (*) in my DELETE statements:
DELETE FROM articles_trial...
Lastly, I recommend using an exit($query); right after building the $query variable just to double check your statement. You usually find your answer to unexpected query results (or lack thereof) this way quite quickly.
<<<<
<?
function db_connect()
{
$result = @mysql_pconnect("aaaaaaa", "bbbbbb", "ccccccc");
if (!$result)
return false;
if (!@mysql_select_db("dddddddd"))
return false;
return $result;
}
?>
<?php
$conn = db_connect();
?>
<?php
$query="delete FROM articles_trial where adate between '$date_start' and '$date_end' and sectionID='$section_id'";
$result= mysql_query ($query);
?>
thank you