Hallo,
ich verzweifle mal wieder. Folgendes Problem
So funktionierts nicht. Bis Z25 (durch // gekennzeichnet) geht es jedoch ohne Probleme, anschließend will mein Script aber nicht mehr. Hoffe es kann mir jemand helfen.
Das funktioniert aber.
ich verzweifle mal wieder. Folgendes Problem
PHP-Code:
<?php
function new_date_event_speichern($datedayfrom,
$datemonthfrom,$dateyearfrom,$datedaytill,
$datemonthtill,$dateyeartill,$timehourfrom,$timeminutefrom,
$timehourtill,$timeminutetill,$eventid)
{
$sql="INSERT INTO dayofevent ( dayofeventid , datedayfrom ,
datemonthfrom , dateyearfrom , datedaytill , datemonthtill ,
dateyeartill , timehourfrom , timeminutefrom , timehourtill , timeminutetill) VALUES
(NULL,'".$datedayfrom."','".$datemonthfrom."',
'".$dateyearfrom."','".$datedaytill."',
'".$datemonthtill."','".$dateyeartill."','".$timehourfrom."',
'".$timeminutefrom."','".$timehourtill."','".$timeminutetill."')";
$result=mysql_query($sql);
if(!result)
{
return mysql_error();
}
$sql="SELECT dayofeventid FROM dayofeventd WHERE
datedayfrom='".$datedayfrom."' AND
datemonthfrom='".$datemonthfrom."' AND
dateyearfrom='".$dateyearfrom."' AND
datedaytill='".$datedaytill."' AND
datemonthtill='".$datemonthtill."' AND
dateyeartill='".$dateyeartill."' AND
timehourfrom='".$timehourfrom."' AND
timeminutefrom='".$timeminutefrom."' AND
timehourtill='".$timehourtill."' AND
timeminutetill='".$timeminutetill."' LIMIT 0,1";
$result=mysql_query($sql);
$row=mysql_fetch_assoc($result);
//Laut fehlermeldung ist Z25 der Fehler.Das wäre hier!!
$sql="INSERT INTO event_day (event_dayid , eventid , dayid) VALUES (NULL,'".$eventid."','".$row["dayofeventid"]."')";
$result=mysql_query($sql);
if($result)
return true;
else
return mysql_error();
}
?>
Warning: mysql_fetch_assoc(): supplied argument is not a valid MySQL result resource in Z:\PHPHPHPHP\dev\test\BRK-TOOL\functions\
new_date_event_speichern.php on line 25
new_date_event_speichern.php on line 25
PHP-Code:
<?php
include("config.php");
$sql="INSERT INTO dayofevent ( dayofeventid , datedayfrom ,
datemonthfrom , dateyearfrom , datedaytill ,
datemonthtill , dateyeartill , timehourfrom ,
timeminutefrom , timehourtill , timeminutetill)
VALUES (NULL,'".$datedayfrom."','".$datemonthfrom."',
'".$dateyearfrom."','".$datedaytill."','".$datemonthtill."',
'".$dateyeartill."','".$timehourfrom."','".$timeminutefrom."',
'".$timehourtill."','".$timeminutetill."')";
$result=mysql_query($sql);
$eventid="20";
$sql="SELECT * FROM dayofevent WHERE
datedayfrom='7' AND
datemonthfrom='7' AND
dateyearfrom='2007' AND
datedaytill='8' AND
datemonthtill='7' AND
dateyeartill='2007' AND
timehourfrom='20' AND
timeminutefrom='0' AND
timehourtill='3' AND
timeminutetill='0' LIMIT 0,1";
$result=mysql_query($sql);
$row=mysql_fetch_assoc($result);
$sql="INSERT INTO event_day (event_dayid , eventid , dayid) VALUES (NULL,'".$eventid."','".$row["dayofeventid"]."')";
$result=mysql_query($sql);
echo$row["dayofeventid"];
?>
Kommentar