*Here is what I am trying to acheive: * Basically I have a form where people can submit events to our database. In the CMS I have a page which displays a record of the number of events.
*Here is what I have: * After the button is clicked, this script is called:
if($subject_type == 'Event') {
$query = "SELECT town, update_id, event_validex ";
$query .= "FROM dev_town ";
$query .= "LEFT JOIN updates ON dev_town.town_id = updates.town ";
$query .= " WHERE sitename = '".SITENAME."'";
$query .= " AND month = " .date('m')." AND year =" .date('Y');
$querys = $this->tep_db_query($query);
$rows = $this->tep_db_fetch_array($querys);
extract($rows); //extract rows, so you don't need to use array
$eventid = $event_validex + 1;
$sql_data_array = array('event_validex' => $eventid);
$submit_to_database = $this->tep_db_perform('updates', $sql_data_array, 'update', "town='".$town."'");
Bu iyi çalışır, ancak ben bir sonraki bit çözmek cant
This is the Problem As you can see, it checks the database for the current month and adds it, this is providing that the sitename and that month are there, not a site and another month.
Onu nasıl siteadı ve ay yok IF içinde satır eklemek için almak istiyorsunuz?
Çalışıyor ki ben elle şimdi ay ekleyerek edilmiştir, ve ben o bir top acı olduğuna katılıyorum eminim.
Cheers peeps