forked from science-ation/science-ation
- Fix rollover for award sources that are NULL
- Add 2 more fields to award rollover
This commit is contained in:
parent
79c3f79e73
commit
c47f53ad93
@ -193,7 +193,16 @@
|
|||||||
echo mysql_error();
|
echo mysql_error();
|
||||||
while($r=mysql_fetch_object($q))
|
while($r=mysql_fetch_object($q))
|
||||||
{
|
{
|
||||||
mysql_query("INSERT INTO award_awards (sponsors_id,award_types_id,name,criteria,description,presenter,`order`,year,excludefromac,cwsfaward,self_nominate,schedule_judges,external_identifier,external_postback,award_source_fairs_id) VALUES (
|
/* award_source_fairs_id could be NULL, we want to keep it NULL if it is */
|
||||||
|
if($r->award_sourcefairs_id == null)
|
||||||
|
$award_source_fairs_id="NULL";
|
||||||
|
else
|
||||||
|
$award_source_fairs_id="'".mysql_real_escape_string($r->award_source_fairs_id)."'";
|
||||||
|
|
||||||
|
mysql_query("INSERT INTO award_awards (sponsors_id,award_types_id,name,criteria,description,
|
||||||
|
presenter,`order`,year,excludefromac,cwsfaward,self_nominate,schedule_judges,external_identifier,
|
||||||
|
external_additional_materials,external_register_winners,
|
||||||
|
external_postback,award_source_fairs_id) VALUES (
|
||||||
'".mysql_real_escape_string($r->sponsors_id)."',
|
'".mysql_real_escape_string($r->sponsors_id)."',
|
||||||
'".mysql_real_escape_string($r->award_types_id)."',
|
'".mysql_real_escape_string($r->award_types_id)."',
|
||||||
'".mysql_real_escape_string($r->name)."',
|
'".mysql_real_escape_string($r->name)."',
|
||||||
@ -208,8 +217,10 @@
|
|||||||
'".mysql_real_escape_string($r->schedule_judges)."',
|
'".mysql_real_escape_string($r->schedule_judges)."',
|
||||||
'".mysql_real_escape_string($r->external_identifier)."',
|
'".mysql_real_escape_string($r->external_identifier)."',
|
||||||
'".mysql_real_escape_string($r->external_postaback)."',
|
'".mysql_real_escape_string($r->external_postaback)."',
|
||||||
'".mysql_real_escape_string($r->award_source_fairs_id)."'
|
'".mysql_real_escape_string($r->external_identifier)."',
|
||||||
)");
|
'".mysql_real_escape_string($r->external_additional_materials)."',
|
||||||
|
'".mysql_real_escape_string($r->external_register_winners)."',
|
||||||
|
$award_source_fairs_id)");
|
||||||
$award_awards_id=mysql_insert_id();
|
$award_awards_id=mysql_insert_id();
|
||||||
|
|
||||||
$q2=mysql_query("SELECT * FROM award_awards_projectcategories WHERE year='$currentfairyear' AND award_awards_id='$r->id'");
|
$q2=mysql_query("SELECT * FROM award_awards_projectcategories WHERE year='$currentfairyear' AND award_awards_id='$r->id'");
|
||||||
|
Loading…
Reference in New Issue
Block a user