catname=Baby und Kind und catid=2 die dazu gehörige id
und die catid muss dann in die tabelle ad unter sitecatid eingetragen werden.
					und die catid muss dann in die tabelle ad unter sitecatid eingetragen werden.
$anzeige="select catid from category where catid = '$catname' LIMIT 0.1"; 
							
						
$anzeige="select catname from category where catid = '$catname' LIMIT 0,1"; 
OffTopic: 
hast du ein glück, dass ich so gut erzogen bin...
while($row = mysql_fetch_object($result))
    {
    //Muss jetzt hier nicht der Insert rein. 
    } 
$anzeige="select catid from category where catfullname = '$catname' LIMIT 0,1";
$result=mysql_query($anzeige,$db) or die(mysql_error());
//echo '<br />---'.$anzeige.'---';
while($row = mysql_fetch_object($result))
    {
    $anzeigen="INSERT into ad ( sitecatid, sitedescription, sitetitle, custom_field_4, sitedate, custom_field_1, ad_username, valid,
expire_days, notify, datestamp) values ('$catid', '$copytext', '$advertheader', '$adverttype',
'$datu', '$link', '$email', '$vale', '$tage', '0', '$datestamp')";
mysql_query($anzeigen, $db);
    } 
$anzeigen="INSERT into ad ( sitecatid, sitedescription, sitetitle, custom_field_4, sitedate, custom_field_1, ad_username, valid,
expire_days, notify, datestamp) values ($row->catid, '$copytext', '$advertheader', '$adverttype',
'$datu', '$link', '$email', '$vale', '$tage', '0', '$datestamp')";
mysql_query($anzeigen, $db); 
// Hier wird die Anzeige eingetragen
$anzeige="select catid from category where catfullname = '$catname' LIMIT 0,1";
$result=mysql_query($anzeige,$db) or die(mysql_error());
//echo '<br />---'.$anzeige.'---';
while($row = mysql_fetch_object($result))
    {
  $row=$catid
    }
$anzeig="select catfatherid from category where catfullname = '$subcatname' LIMIT 0,1";
$result=mysql_query($anzeig,$db) or die(mysql_error());
//echo '<br />---'.$anzeig.'---';
while($row = mysql_fetch_object($result))
    {
$anzeigen="INSERT into ad ( sitecatid, catfatherid, sitedescription, sitetitle, custom_field_4, sitedate, custom_field_1, ad_username, valid,
expire_days, notify, datestamp) values ('$catid', $row->catfatherid, '$copytext', '$advertheader', '$adverttype',
'$datu', '$link', '$email', '$vale', '$tage', '0', '$datestamp')";
mysql_query($anzeigen, $db);
    } 
Kommentar