Jump to content

Search the Community

Showing results for tags 'sql'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • W3Schools
    • General
    • Suggestions
    • Critiques
  • HTML Forums
    • HTML/XHTML
    • CSS
  • Browser Scripting
    • JavaScript
    • VBScript
  • Server Scripting
    • Web Servers
    • Version Control
    • SQL
    • ASP
    • PHP
    • .NET
    • ColdFusion
    • Java/JSP/J2EE
    • CGI
  • XML Forums
    • XML
    • XSLT/XSL-FO
    • Schema
    • Web Services
  • Multimedia
    • Multimedia
    • FLASH

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


AIM


MSN


Website URL


ICQ


Yahoo


Jabber


Skype


Location


Interests


Languages

  1. Hey guys...it's me again...so, below you will find the script that I have that is supposed to update my database, however, it does NOTHING but return "Record Updated" and never updated anything. Any suggestions? $update = "UPDATE clients SET ( 'userid' = '{$_SESSION['myusername']}', 'cp_firstname' = '$_POST[cp_firstname]', 'cp_lastname' = '$_POST[cp_lastname]', 'cp_address' = '$_POST[cp_address]', 'cp_city' = '$_POST[cp_city]', 'cp_state' = ' $_POST[cp_state] ', 'cp_zip' = ' $_POST[cp_zip] ', 'cp_zip4' = ' $_POST[cp_zip4] ', 'cp_homeph' = '$_POST[cp_homeph] ', 'cp_workph' = '$_POST[cp_workph] ', 'cp_cellph' = '$_POST[cp_cellph] ', 'cp_email' = '$_POST[cp_email] ', 'alt_firstname' = '$_POST[alt_firstname] ', 'alt_lastname' = '$_POST[alt_lastname] ', 'alt_homeph' = '$_POST[alt_homeph] ', 'alt_cellph' = '$_POST[alt_cellph] ', 'non_firstname' = '$_POST[non_firstname] ', 'non_lastname' = '$_POST[non_lastname] ', 'non_home' = '$_POST[non_address] ', 'non_city' = '$_POST[non_city] ', 'non_state' = '$_POST[non_state] ', 'non_zip' = '$_POST[non_zip] ', 'non_zip4' = '$_POST[non_zip4] ', 'non_homeph' = '$_POST[non_homeph] ', 'non_workph' = '$_POST[non_workph] ', 'non_cellph' = '$_POST[non_cellph] ', 'non_email' = '$_POST[non_email] ', 'placeofemployment' = '$_POST[placeofemployment] ', 'datestart' = '$_POST[datestart] ', 'supportamount' = '$_POST[supportamount] ', 'judgmentdate' = '$_POST[judgmentdate] ', 'judge' = '$_POST[judge]', 'beg_bal' = '$_POST[beg_bal]' WHERE client_id='{$_SESSION['client_id']}')"; mysql_query($update);echo "Record updated"; Where'd I go wrong???
  2. Hi, I'm using SQL loader to load my data into database. Before I insert the data I need to remove existing data in the table: options(skip=1,load=250000,errors=0,ROWS=30000,BINDSIZE=10485760)load datainfile 'G:1.csv' "str '^_^'" replaceinto table IMPORT_ABCfields terminated by "," OPTIONALLY ENCLOSED BY '"'trailing nullcols(....) But I got error like: SQL*LOADER-926: OCI error while executing delete/truncate <due to REPLACE/TRUNCATE keyword> for table IMPORT_ABCORA-30036: unable to extend segment by 8 in undo tablespace 'undo1' How can I delete data for example by 10000 rows?I know that I have some limit on my DB.
  3. First, I would like to thank JUSTSOMEGUY for his extensive assistance with one hurdle on my report page. Now I need to do the calculations. Since I need my calculations to operate within 3 different IF statements and within the WHILE loop, I just guessed to put all the calculations after the beginning of the WHILE statement and before the first IF statement. Here is the code from WHILE statement to the first line of the report. However, NONE of the calculations are let someone live with them...ugh! while($monthStart <= $today){$payment_found = false; foreach ($payments as $payment) { $p = .08; //Percentage$dp = .08/365; // Returns Daily Percentage$datetime1 = new DateTime(strtotime('$monthStart')); //Get/Set Date 1$datetime2 = new DateTime(strtotime('$monthEnd')); // Get/Set Date 2//If first line of report, there won't be a $monthEndif (strtotime($monthEnd) <= 0) { $interval = 0;} else {$interval = $datetime1->diff($datetime2);}$dayslate = date('d', strtotime($interval));$intacc = ($dp * $dayslate) * $pmtamt;$appint = 1 * $intacc;$appprinc = $pmtamt - $appint;$bal = $pmtamt - ($appint + $appprinc);if (strtotime($payment['pmt_date']) >= $monthStart && strtotime($payment['pmt_date']) < $monthEnd) { $payment_found = true;if (strtotime($payment['pmt_date']) > $monthStart) {echo '<tr><td style="border-bottom-color:#3105b0; border-bottom-style:dashed; border-bottom-width:thin;"><center>'. date("m.d.Y", $monthStart) . '</center></td>'; There's NO output in any fields, except "Days Late". (I added a Days Late column to my output table to see if it returns any values...it ONLY returns "31") Any suggestions....? (Not sure what I was trying to say before I edited that)
  4. I am creating an admission form which will ask for the information such as name, class, level, and such other information, so, I don't know how to connect to the database and how to make the database and how the database will store all that information. Can anybody explain it with real example with the code?
  5. Hello w3s.i'm not sure if i have asked in the right forum, was unsure if i should put the question in PHP or SQL area, anyways. i have attached a image where i show my so called forum so far made myself without trouble.Now i have ran into trouble that i would like to ask help for. LOOK AT PICTURE FOR THE IDEA here is my code: Menu: $HTMLOUT .= box_start("Forum Menu");$fm_res = mysql_query("SELECT * FROM mod_forum_menu ORDER BY fm_id ASC");$get_fc_id = (isset($_GET['fc_id']) ? '?fc_id='.$_GET['fc_id'].'&' : '?');//if isset...if (mysql_num_rows($fm_res) > 0)//if bigger than 0...{while($fm_array = mysql_fetch_assoc($fm_res))//fm = forum_menu{ $HTMLOUT .= "(<a href='forums_v1.php".$get_fc_id."fm_id=".$fm_array['fm_id']."' alt='".$fm_array['fm_name']."'>".$fm_array['fm_name']."</a>) ";}}else{$HTMLOUT .= "No forum menu added yet, please contact First Line Support for further information!...";}$HTMLOUT .= box_end(); Forum Categories: /*Category Forums...*/if(isset($_GET['fm_id'])){$fc_res = mysql_query("SELECT * FROM mod_forum_cats WHERE fc_id = ".$_GET['fm_id']);}else{$fc_res = mysql_query("SELECT * FROM mod_forum_cats ORDER BY fc_id ASC");}/*Category Forums...*/$get_fm_id = (isset($_GET['fm_id']) ? '?fm_id='.$_GET['fm_id']."&" : '?');//if isset...if (mysql_num_rows($fc_res) > 0)//if bigger than 0...{//$HTMLOUT .= "Forum(s) succes showed...<br />";while($fc_array = mysql_fetch_assoc($fc_res))//fc = forum_category{ $HTMLOUT .= "<div id='forum_cats_title_wrapper'>"; $HTMLOUT .= "<a href='forums_v1.php".$get_fm_id."fc_id=".$fc_array['fc_id']."'>".$fc_array['fc_name']."</a><-FORUM CATEGORY LIKE LH!..."; $HTMLOUT .= "</div>"; $HTMLOUT .= "<div id='under_forum_cats_title_wrapper'>"; $HTMLOUT .= "--<a href='#'>ACTUAL FORUM 1 HERE...</a><br />"; $HTMLOUT .= "--<a href='#'>ACTUAL FORUM 2 HERE...</a>"; $HTMLOUT .= "</div>";}}else{if($CURUSER['class'] >= UC_ADMIN)//equal or over ADMIN level for this message...{ $HTMLOUT .= " Admin Message:<br /><br /> Remember to add a Forum category before the real forums can be showed!...";}else{ $HTMLOUT .= "No forum categories added yet, please contact First Line Support for further information!...";}} now, i have done almost everything correct, i think, i have not errors so far.My trouble now lies in that i need to output the actual forums lying under the Forum Categories...how to do this in an another SQL?, the current one as you see is inside a while loop, and i should as far as i have been thinking, be in the same while loop... ideas?... PS:if you need more info, tell me so and i will try to explain in details of what i am doing, thanks again! ...
  6. Okay, here's HOW the code is supposed to work: Customer enters $startdate for a client in one form (info stored in one db table). Then customer enters several payments since $startdate. Then a report is automatically generated where the list on the left side of the report it automatically starts a date count from $startdate to $today. What I need to do is have the while loop pause, insert a payment entry based on date, then continue from there. There's also other things the report will do, but first thing's first...here's the working code that adds 1 month to the $startdate then stops when the payment date is entered into the while loop. ...require ('connect.php');$myusername = $_SESSION["myusername"];$data1 = mysql_query("SELECT * FROM clients WHERE client_id = ". $_SESSION['clientid'] ."") or die(mysql_error());$data = mysql_query("SELECT * FROM payments WHERE client_id = ". $_SESSION['clientid'] ." ORDER BY YEAR(pmt_date) ASC") or die(mysql_error());$row = mysql_fetch_assoc($data1);$row2 = mysql_fetch_assoc($data);$startdate = strtotime($row['datestart']);$today = strtotime('now');$pmt_date = strtotime($row2['pmt_date']);$amtdue = $row['supportamount'];...<p>Report for Client: <? echo $row['cp_firstname'] . " " . $row['cp_lastname'] ;?> <br /> <?phpecho '<table width="900" cellpadding="2" cellspacing="2">';echo '<tr><td style="border-bottom-color:#3105b0; border-bottom-style:dashed; border-left-style:dashed; border-right-style:dashed; border-width:thin;"><center>Date</center></td>';echo '<td style="border-bottom-color:#3105b0; border-bottom-style:dashed; border-left-style:dashed; border-right-style:dashed; border-width:thin;"><center>Amount Due</center></td>';echo '<td style="border-bottom-color:#3105b0; border-bottom-style:dashed; border-left-style:dashed; border-right-style:dashed; border-width:thin;"><center>Amount Paid</center></td>';echo '<td style="border-bottom-color:#3105b0; border-bottom-style:dashed;border-left-style:dashed; border-right-style:dashed; border-width:thin;"><center>Interest Accumulated</center></td>';echo '<td style="border-bottom-color:#3105b0; border-bottom-style:dashed;border-left-style:dashed; border-right-style:dashed; border-width:thin;"><center>Applied to Interest</center></td>';echo '<td style="border-bottom-color:#3105b0; border-bottom-style:dashed;border-left-style:dashed; border-right-style:dashed; border-width:thin;"><center>Applied to Principle</center></td>';echo '<td style="border-bottom-color:#3105b0; border-bottom-style:dashed;border-left-style:dashed; border-right-style:dashed; border-width:thin;"><center>Balance</center></td></tr>';while($startdate < $today){ echo '<tr><td style="border-bottom-color:#3105b0; border-bottom-style:dashed; border-bottom-width:thin;"><center>'. date("m.d.Y", $startdate) . '</center></td>'; echo '<td style="border-bottom-color:#3105b0; border-bottom-style:dashed; border-bottom-width:thin;"><center>'. "$". $english_format_number = number_format($amtdue, 2, '.',',') .'</center></td>'; echo '<td style="border-bottom-color:#3105b0; border-bottom-style:dashed; border-bottom-width:thin;"><center>'. "$". $english_format_number = number_format($row2["pmt_amt"], 2, '.',',') . '</center></td>'; echo '<td style="border-bottom-color:#3105b0; border-bottom-style:dashed; border-bottom-width:thin;"><center>'. "$". $english_format_number = number_format($intacc, 2, '.',',') . '</center></td>'; echo '<td style="border-bottom-color:#3105b0; border-bottom-style:dashed; border-bottom-width:thin;"><center>'. "$". $english_format_number = number_format($appint, 2, '.',',') . '</center></td>'; echo '<td style="border-bottom-color:#3105b0; border-bottom-style:dashed; border-bottom-width:thin;"><center>'. "$". $english_format_number = number_format($appprinc, 2, '.',',') . '</center></td>'; echo '<td style="border-bottom-color:#3105b0; border-bottom-style:dashed; border-bottom-width:thin;"><center>'. "$". $english_format_number = number_format($bal, 2, '.',',') . '</center></td></td>'; $startdate = strtotime('+1 month', $startdate);}echo '</table>'; If there are any suggestions that you might be able to give me to rectify this particular issue, that would be FANTASTIC!!!
  7. Conan

    PHP Mail() Problem

    Hello everyone, I'm new here, and I don't know where am I suppose to post this, but I think it's here .So, as the title says, my problem is that I've made everything correct, but the mail doesn't send to my email, or to the email I want, but it passes the code (I mean it gives me that "successfuly sent"), but when I check my email, there is nothing . here is the code, please id there is anything wrong tell me <?PHPfunction checkrow11($query1) { $query = mssql_query($query1); if(mssql_num_rows($query) > 0) { return true; } else { return false; } }/////////////////////////////// Coded By Conan ///////////////////////////////////if(isset($_POST['recover'])){ $email = $_POST['emadd']; if($email == '') { $err = "Fill in all the empty fields please."; } else { if(checkrow11("SELECT * FROM Account WHERE Email = '".$email."'") == true) { $query111 = odbc_exec($connect, "SELECT UserID FROM Account WHERE Email = '".$email."'"); odbc_fetch_row($query111); $userid = odbc_result($query111, 1); $query112 = odbc_exec($connect, "SELECT Password FROM Login WHERE UserID = '".$userid."'"); odbc_fetch_row($query112); $pswd = odbc_result($query112, 1); $to = $email;$subject = "ID/Password Recover";$message = "Your UserID: ".$userid."<br>Your Password: ".$pswd;$headers = "From: Staff Team";$sent = mail($to, $subject, $message, $headers); if($sent){ $err="<font color='lightgreen'>Sent Successfuly.</font>";}else{ $err="Something went wrong, please try again later.";} } else { $err = "The E-mail you have entered is incorrect, or it's NOT found."; } }}?><div id="simplepage"><div id="simpletitle"><span style="margin-left:6px;">ID/Password Recovery</span></div><center><font size="2"><br><br>To recover your ID & Password, please enter your e-mail address in the field below.<br>The e-mail must be the ID's e-mail, you have used when you created the account.<br><br></font></center><form method="post" action=""><table id="registertable"><tr><td>Your E-Mail Address:</td><td><input type="text" maxlength="30" class="simpleinput" id="emadd" autocomplete="on" name="emadd"/></td></tr><tr><td><input type="Submit" name="recover" value="Recover !"></td><td></td></tr></table></form><br><br><center><font color="lightblue" size="2">A massage wil be sent to your e-mail, includes your ID/Password.</font></center><br><br><center><font color="pink" size="2"><?=$err;?></font></center></div>
  8. Hey Everyone! i have write this code for sending mail but it is not working. It is echoing the Error message. <?phpinclude "config.php";if(!$_POST) exit;$email = $_POST['email'];if(!preg_match('/\.([^\.]*$)/',$email )){$error.="Invalid email address entered";$errors=1;}if($errors==1) echo $error;else{$values = array ('name','email','message');$required = array('name','email','message'); $your_email = "aneeb@gmail.com";$email_subject = "New Message: ".$_POST['subject'];$email_content = "new message:\n";foreach($values as $key => $value){ if(in_array($value,$required)){ if ($key != 'subject' && $key != 'company') { if( empty($_POST[$value]) ) { echo 'PLEASE FILL IN REQUIRED FIELDS'; exit; } } $email_content .= $value.': '.$_POST[$value]."\n"; }} if(@mail($your_email,$email_subject,$email_content)) { echo 'Message sent!';} else { echo 'ERROR!';}}?> Please help me..
  9. I have Table2 with a foreign key to Table1. I want to create a trigger that automatically update Table2 when Table1 is updated. Here is what's on my mind: create trigger MyTrigger on Table1 instead of update asif UPDATE(Table1_ID)begin declare @OldID as int, @NewID as int; select @OldID=P_ID from deleted; select @NewID=P_ID from inserted; update Table2 set Table1_ID=@NewID where Table2.Table1_ID=@OldID; update Table1 set Table1_ID=@NewID where Table1_ID=@OldID;end I received an error from SQL Server indicating that there was a conflict with the foreign key constraint when I tried to update a row. So I modified it a bit: create trigger MyTrigger on Table1 instead of update asif UPDATE(Table1_ID)begin declare @OldID as int, @NewID as int; select @OldID=P_ID from deleted; select @NewID=P_ID from inserted; update Table2 set Table1_ID=null where Table2.Table1_ID=@OldID; update Table1 set Table1_ID=@NewID where Table1_ID=@OldID; update Table2 set Table1_ID=@NewID where Table1_ID=null;end It does work. But pre-existing null values from Table2 are obviously lost if the trigger runs. What is the correct way to do this? Note that I already know of the cascading option when creating table. I just want to do it using trigger. Thanks. Note: I don't know how to loop through the inserted and deleted tables when multiple rows are updated. I'm assuming 1 row is updated at a time.
  10. ok, just quick... im getting this when trying to login: Unknown column 'e5035533a816cac4c54012281f58543d' in 'where clause' and this is my takelogin.php file: /*==========RUN LOGIN PROCEDURE===============*/$uname = sqlesc($_POST['username']); /*Form Names...*/$pass = sqlesc($_POST['password']); /*Form Names...*/if(isset($pass)){$passhash = md_5($pass); /*Securing The Data...*/}$query = "SELECT * FROM users WHERE username = $uname AND passhash = $passhash AND enabled = 'yes' AND status = 'confirmed'";$query_result = mysql_query($query)or die(mysql_error());//Running query to the DB...if(mysql_num_rows($query_result) == 1)/*if the DB returns somfthing, then run...*/{$row = mysql_fetch_array($query_result);$_SESSION['uid'] = $row['u_id'];$_SESSION['username'] = $row['username'];$_SESSION['pass'] = $row['passhash'];$_SESSION['status'] = $row['status'];$_SESSION['enabled'] = $row['enabled'];$_SESSION['email'] = $row['email'];$_SESSION['ip'] = $row['ip'];$_SESSION['class'] = $row['class'];$_SESSION['time_offset'] = $row['time_offset'];$_SESSION['dst_in_use'] = $row['dst_in_use'];$_SESSION['auto_correct_dst'] = $row['auto_correct_dst'];header('Refresh: 3; url=index.php');//with time delay...}else/*Error messeage...*/{$HTMLOUT .= "<center>Error reading login-session coding base, or a wrong username/pass inserted...</center>";header('Refresh: 3; url=index.php');//with time delay...}/*==========RUN LOGIN PROCEDURE===============*/ any ideas? Oo...
  11. Hello everybody, I have a little problem here...I have a XML file, that is a database itself containing information about terminology in two languages... This exemple file is to be "uploaded" into a MySQL databse, on Ubuntu, which is already built and ready to get the information from the XML files... The thing is: how can I start doing this uploading process? Is shell script a good way? Or is it better to use another tool? How? The file is here, attached. Thank you XML_exemple.mtf.xml
  12. When I try to run this update query in ms access 2007 I get an error box message that says "Data type mismatch in criteria expression". I know the problem is at the end around replace(property.[park city]," ","")=replace(locations2011.city," ",""). But I checked the data types for all the related columns, which is text, and they all match for both tables. If I put quotes around property.[park city] or remove the replace function from it, the query will run but obviously not how I want it to. I've tested this code with a smaller table and it works so what's the problem? UPDATE property, locations2011 SET property.county = locations2011.countyWHERE property.county Is Null And property.[park state]=locations2011.state And replace(property.[park city]," ","")=replace(locations2011.city," ",""); I know I can just remove all the spaces from the property table with ctrl+h replace all but I'd rather leave the data that's already there alone if possible.
  13. I'm probably too damaged of working with C# and LinQ, so havn't done a real SQL sentance since my work in Java.I have two tables, which are combined with a PK and FK. Table_MyCust with PK CustID and Table_CustApartments which contain CustID as FK.I want to make a XML document with PHP, where there is a node for each MyCust row, and for each MyCust there is a CustApartments for each apartment that have the current CustID as FK. In C# I've do something like the following: XElement xml = new XElement("customers", from p in DatabaseConnection.Custs orderby p.CustName select new XElement("customer", new XAttribute("customerName", p.CustName), new XElement("Addresses", (from l in p.Aparts.Distinct() orderby l.Street where l.Street != null && !l.Postal.Equals("1010") select new XElement("Address", (string)l.Street); ))); But how does I do in PHP? Does you create a SQL sentance with some kind of a join operation? Or do you create two SQL statments, and check for equals on the PK and FK while running through all the rows? I'm not sure whats the 'correct' way to do in PHP, since I'm fairly new to PHP scripting yet.
  14. So far i know that columns with 1-5 character should be marked as "Char" instead of "Varchar" because of less memory usage. Does this run SQL-database faster if i just choose certain values like SELECT name, password FROM account instead of SELECT * FROM account? Does it actually mater do i choose char or varchar?
  15. Need to convert some columns to different data type, but this statement will not work. Any idea what I am missing? (mgmt Studio has the first 'CAST' and 'AS' underlined. SELECT CAST [ETL_ID as int] as ETL_ID, NAMEX, DU_DEGREE_STATUS, DU_ESTS_DESC, Cast [bANNER_ID as (varchar(36),Null)]as BANNER_ID, DU_COLLEGE_DESC, cAST [DU_DEL_TERM_CODE_ADMIT as (VARCHAR(255),NULL)] AS DU_DEL_TERM_CODE_ADMIT, AGE, ETHNICITY_DESCRIPTION, GENDER, cAST [T1 as (VARCHAR(255),NULL)] AS T1, T1Status, cAST [T2 as (VARCHAR(255),NULL)] as T2, T2Status, cAST [T3 as (VARCHAR(255),NULL)] as T3, T3Status, cAST [T4 as (VARCHAR(255),NULL)] as T4, T4StatusFROM dbo.['Tracking 3$']
  16. Hello I have example database where is (Few values added) ID, SUBJECT, NAME1, Hello world, Mudsaf2, Hello world2, Mudsaf Then i get the data from sql with query (querys and row works perfectly <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.7/jquery.js"></script><script src="http://malsup.github.com/jquery.form.js"></script> <script> // wait for the DOM to be loaded $(document).ready(function() { // bind 'myForm' and provide a simple callback function $('#removepost').ajaxForm(function() { alert("Something happened"); }); }); </script> <?php$query = "blablaablla"... untill while ($row = mysql_fetch_array($result)) { echo "<form id='removepost' method='post' action='script/removepost.php'> <input type='hidden' readonly='readonly' name='id' id='id' value='1' /> <input type='submit' name='submit' id='submit' value='Remove'></form>" . $row['SUBJECT']; } ?> The form works perfectly, but doesn't work with jQuery. http://malsup.com/jquery/form/ <--- This method doesn't work So im wondering is it possible to get that script work OR where do i link the jQuery files. So currenctly it goes to script/removepost.php, but it should stay at same page and let jQuery run the script whitout page refreshing/moving to action file. Should the form be changed from id to class and in jquery the #removepost to .removepost?
  17. Happy new year all, I am hoping that someone can help me with a problem I'm having. I'm using a mysql foreach query to retrieve certain data from the database. However I'm only able to get one set of information per row. Could you please advise me of where the best place is to start reseaching. If I have not explained myself clearly I can provide more information as required. I look forward to hearing from you guys soon. RegardsMatthias
  18. Hello, im not sure should i add this to "SQL" category since this is bit more sql-related but any fix to this. I have timestamp field in my database and it has worder ORDER BY Desc so far from oldest to newest and now at 2013 it doesn't work like that. SELECT * FROM ms_news ORDER BY newsDate DESC LIMIT 0, 1 Last 2 values Code displays this 2013-01-03 01:48:05 Should display this 2013-01-04 01:03:53 At year 2012 it worked from oldest to newest so im not sure does the 2013 year mess the desc somehow. Blargh fixed, had taken the value from Date and not Datetime
  19. I want to ask if there is any free MySQL server that supports remote access.People say FreeMySQL.net is one of the choices but I cannot connect to it through a PHP script on another web hosting server.Any idea?
  20. ok i designed a multipart recruitment time editor for this site and tested and it worked fine 4 days ago no edits since then and now it is not working. here is the error: it comes up in ** elseif($p == "Schedule_TMH") { ** after submitting the data. Here is the primary code:<?phpif(checkLogin(MEMBER_NAME, MEMBER_PASS) AND checkRank(MEMBER_RANK, $pid)) {include("include/classes/class_global.php");if($p == "") {echo "<table align='center' border='1' cellspacing='0' cellpadding='3' width='600' bordercolor='FFCC33'><tr><td bordercolor='FFCC33' class='titles' align='center'><b>Manage: Ten Minutes of ######</b></td></tr><tr><td bordercolor='FFCC33' style='border-top-width: 0px' class='main'><br><blockquote>This Shows all Trial Members who are in TMH Stage, reguardless if they have passed, failed, not been scheduled, or are awaiting thier TMH. Note that changing thier TMH times, weather by schuduling them or re-scheduling them, will result in a PM to that Trial Member informing on this.<br><br>";$query = "SELECT * FROM {$dbprefix}requestjoin WHERE ip_check != '0' AND elite_check != '0' AND screenname_check != '0' AND next_stage != '0' AND completed_tmh = '0' ORDER BY tmh_time_int ASC";$result = mysql_query($query) or die(mysql_error());while($row = mysql_fetch_array($result)){extract($row);foreach($row AS $key => $value) { ${$key} = addslashes(textFilter($value)); }if($tmh_time_int == 0) { $tmh_time_info = "<font color='green'> - TMH not Scheduled</font>"; $Console_Manage_tmh = "<a href='console.php?pid=$pid&p=Schedule_TMH&join_id=$id&name=$name'>| Schedule TMH |</a>"; }elseif($tmh_time_int == 1) { $tmh_time_info = "<font color='green'> - TMH at $tmh_time</font>"; $Console_Manage_tmh = "<a href='console.php?pid=$pid&p=Passed_TMH&join_id=$id'>| Passed TMH |</a><a href='console.php?pid=$pid&p=Schedule_TMH&join_id=$id&name=$name'>| Re-Schedule TMH |</a><a href='console.php?pid=$pid&p=Failed_TMH&join_id=$id'>| Failed TMH |</a>"; } echo "<tr><td class='main' align='center' width='600'><br><b>$name</b>$tmh_time_info<br><br>$Console_Manage_tmh<br><br></td</tr>";}echo "</blockquote></td></tr></table>";} /// THIS IS WHERE THE ERROR COMES UP ///elseif($p == "Schedule_TMH") {if($submit) {if($tmh_time1 != "USED") {$recruits_id = getMemberInfo("id", $name);$rec_timezone = getMemberInfo("timezone", $name);$new_time = getConvertedTime("converted", $rec_timezone, $tmh_time1);$message1 = "Your TMH time has been changed to $new_time on $this_saturday. Disreguard all other messages reguarding your TMH time. Please be online ready to go 10 minutes prior to this time. Also it is best that you update your profile and re-read the rules of the clan.";$query = "INSERT INTO {$dbprefix}privatemessages (sender_id, receiver_id, datesent, subject, message, status, originalpm_id) VALUES ('$memid', '$recruits_id', '$time', 'Your TMH Time', '$message1', '1', '$original')";$result = mysql_query($query)or die(mysql_error());$query = "UPDATE {$dbprefix}requestjoin SET tmh_time_int = '1', tmh_time = '$tmh_time1' WHERE id = '$join_id'";$result = mysql_query($query)or die(mysql_error());echo "<table width='400' border='0' align='center'><tr><td class='main' width='400' border='3' bordercolor='#FFCC33'>$tmh_success</td></tr></table>"; }else {echo "<table width='400' border='0' align='center'><tr><td class='main' width='400' border='3' bordercolor='#FFCC33'>$tmh_sorry</td></tr></table>";}}elseif(!$submit) {if($mem_timezone_id == 3) {$time_options = "<option value='$pm3'>10:00am - $pm3USED</option><option value='$pm35'>10:30am - $pm35USED</option><option value='$pm4'>11:00am - $pm4USED</option><option value='$pm45'>11:30am - $pm45USED</option><option value='$pm5'>12:00pm - $pm5USED</option><option value='$pm55'>12:30pm - $pm55USED</option><option value='$pm6'>1:00pm - $pm6USED</option><option value='$pm65'>1:30pm - $pm65USED</option><option value='$pm7'>2:00pm - $pm7USED</option><option value='$pm75'>2:30pm - $pm75USED</option>";$contact = "";}elseif($mem_timezone_id == 4) {$time_options = "<option value='$pm3'>11:00am - $pm3USED</option><option value='$pm35'>11:30am - $pm35USED</option><option value='$pm4'>12:00pm - $pm4USED</option><option value='$pm45'>12:30pm - $pm45USED</option><option value='$pm5'>1:00pm - $pm5USED</option><option value='$pm55'>1:30pm - $pm55USED</option><option value='$pm6'>2:00pm - $pm6USED</option><option value='$pm65'>2:30pm - $pm65USED</option><option value='$pm7'>3:00pm - $pm7USED</option><option value='$pm75'>3:30pm - $pm75USED</option>";$contact = "";}elseif($mem_timezone_id == 5) {$time_options = "<option value='$pm3'>12:00pm - $pm3USED</option><option value='$pm35'>12:30pm - $pm35USED</option><option value='$pm4'>1:00pm - $pm4USED</option><option value='$pm45'>1:30pm - $pm45USED</option><option value='$pm5'>2:00pm - $pm5USED</option><option value='$pm55'>2:30pm - $pm55USED</option><option value='$pm6'>3:00pm - $pm6USED</option><option value='$pm65'>3:30pm - $pm65USED</option><option value='$pm7'>4:00pm - $pm7USED</option><option value='$pm75'>4:30pm - $pm75USED</option>";$contact = "";}elseif($mem_timezone_id == 6) {$time_options = "<option value='$pm3'>1:00pm - $pm3USED</option><option value='$pm35'>1:30pm - $pm35USED</option><option value='$pm4'>2:00pm - $pm4USED</option><option value='$pm45'>2:30pm - $pm45USED</option><option value='$pm5'>3:00pm - $pm5USED</option><option value='$pm55'>3:30pm - $pm55USED</option><option value='$pm6'>4:00pm - $pm6USED</option><option value='$pm65'>4:30pm - $pm65USED</option><option value='$pm7'>5:00pm - $pm7USED</option><option value='$pm75'>5:30pm - $pm75USED</option>";$contact = "";}elseif($mem_timezone_id == 7) {$time_options = "<option value='$pm3'>2:00pm - $pm3USED</option><option value='$pm35'>2:30pm - $pm35USED</option><option value='$pm4'>3:00pm - $pm4USED</option><option value='$pm45'>3:30pm - $pm45USED</option><option value='$pm5'>4:00pm - $pm5USED</option><option value='$pm55'>4:30pm - $pm55USED</option><option value='$pm6'>5:00pm - $pm6USED</option><option value='$pm65'>5:30pm - $pm65USED</option><option value='$pm7'>6:00pm - $pm7USED</option><option value='$pm75'>6:30pm - $pm75USED</option>";$contact = "";}elseif($mem_timezone_id == 8) {$time_options = "<option value='$pm3'>3:00pm - $pm3USED</option><option value='$pm35'>3:30pm - $pm35USED</option><option value='$pm4'>4:00pm - $pm4USED</option><option value='$pm45'>4:30pm - $pm45USED</option><option value='$pm5'>5:00pm - $pm5USED</option><option value='$pm55'>5:30pm - $pm55USED</option><option value='$pm6'>6:00pm - $pm6USED</option><option value='$pm65'>6:30pm - $pm65USED</option><option value='$pm7'>7:00pm - $pm7USED</option><option value='$pm75'>7:30pm - $pm75USED</option>";$contact = "";}elseif($mem_timezone_id == 9) {$time_options = "<option value='$pm3'>4:00pm - $pm3USED</option><option value='$pm35'>4:30pm - $pm35USED</option><option value='$pm4'>5:00pm - $pm4USED</option><option value='$pm45'>5:30pm - $pm45USED</option><option value='$pm5'>6:00pm - $pm5USED</option><option value='$pm55'>6:30pm - $pm55USED</option><option value='$pm6'>7:00pm - $pm6USED</option><option value='$pm65'>7:30pm - $pm65USED</option><option value='$pm7'>8:00pm - $pm7USED</option><option value='$pm75'>8:30pm - $pm75USED</option>";$contact = "";}elseif($mem_timezone_id == 10) {$time_options = "<option value='$pm3'>4:30pm - $pm3USED</option><option value='$pm35'>5:00pm - $pm35USED</option><option value='$pm4'>5:30pm - $pm4USED</option><option value='$pm45'>6:00pm - $pm45USED</option><option value='$pm5'>6:30pm - $pm5USED</option><option value='$pm55'>7:00pm - $pm55USED</option><option value='$pm6'>7:30pm - $pm6USED</option><option value='$pm65'>8:00pm - $pm65USED</option><option value='$pm7'>8:30pm - $pm7USED</option><option value='$pm75'>9:00pm - $pm75USED</option>";$contact = "";}elseif($mem_timezone_id == 11) {$time_options = "<option value='$pm3'>5:00pm - $pm3USED</option><option value='$pm35'>5:30pm - $pm35USED</option><option value='$pm4'>6:00pm - $pm4USED</option><option value='$pm45'>6:30pm - $pm45USED</option><option value='$pm5'>7:00pm - $pm5USED</option><option value='$pm55'>7:30pm - $pm55USED</option><option value='$pm6'>8:00pm - $pm6USED</option><option value='$pm65'>8:30pm - $pm65USED</option><option value='$pm7'>9:00pm - $pm7USED</option><option value='$pm75'>9:30pm - $pm75USED</option>";$contact = "";}elseif($mem_timezone_id == 12) {$time_options = "<option value='$pm3'>6:00pm - $pm3USED</option><option value='$pm35'>6:30pm - $pm35USED</option><option value='$pm4'>7:00pm - $pm4USED</option><option value='$pm45'>7:30pm - $pm45USED</option><option value='$pm5'>8:00pm - $pm5USED</option><option value='$pm55'>8:30pm - $pm55USED</option><option value='$pm6'>9:00pm - $pm6USED</option><option value='$pm65'>9:30pm - $pm65USED</option><option value='$pm7'>10:00pm - $pm7USED</option><option value='$pm75'>10:30pm - $pm75USED</option>";$contact = "";}elseif($mem_timezone_id == 13) {$time_options = "<option value='$pm3'>7:00pm - $pm3USED</option><option value='$pm35'>7:30pm - $pm35USED</option><option value='$pm4'>8:00pm - $pm4USED</option><option value='$pm45'>8:30pm - $pm45USED</option><option value='$pm5'>9:00pm - $pm5USED</option><option value='$pm55'>9:30pm - $pm55USED</option><option value='$pm6'>10:00pm - $pm6USED</option><option value='$pm65'>10:30pm - $pm65USED</option><option value='$pm7'>11:00pm - $pm7USED</option><option value='$pm75'>11:30pm - $pm75USED</option>";$contact = "";}else {$time_options = "An ERROR Occured";$contact = "<br>Contact:<br>$OpsComm_tmh<br>";}echo "<form action='console.php?pid=$pid&p=Schedule_TMH&join_id=$join_id&name=$name' method='post'><table width='600' border='1' bordercolor='#000000' align='center'><tr><td class='main' width='600' border='1' bordercolor='#FFCC33' align='center'><select name='tmh_time1' class='form'>$time_options</select>$contact</td></tr><tr><td class='titles' align='center' width='600' border='2' bordercolor='#FFCC33'><br><br><input type='submit' name='submit' value='Submit Time' class='apps_formbutton'></td></tr></table></form>"; }}elseif($p == "Passed_TMH") {$query = "UPDATE {$dbprefix}requestjoin SET tmh_time_int = '2' WHERE id = '$join_id'";$result = mysql_query($query)or die(mysql_error());echo "<table width='400' border='0' align='center'><tr><td class='main' width='400' border='3' bordercolor='#FFCC33'>$tmh_success2</td></tr></table>"; }elseif($p == "Failed_TMH") {$query = "UPDATE {$dbprefix}requestjoin SET tmh_time_int = '3' WHERE id = '$join_id'";$result = mysql_query($query)or die(mysql_error());echo "<table width='400' border='0' align='center'><tr><td class='main' width='400' border='3' bordercolor='#FFCC33'>$tmh_success3</td></tr></table>"; }}else {echo "<table align='center' border='0' cellspacing='0' cellpadding='0' width='550'><tr><td class='main' align='center'><img src='images/restrictedarea.png' border='0'></td></tr></table>";} ?> here is the global.php file: <?phpinclude("include/classes/class_member.php");include("include/classes/class_tmh.php");include("include/classes/class_recruitment.php");include("include/classes/class_staff.php");$tmh_message = "Choose a time to do your Evaluation.<br><br>These times are auto made to ($mem_timezone) timezone. If this timezone is wrong then go to \"Edit Profile\" in \"Your Account\" and select the correct timezone.<br><br><b>* NOTE *</b><br>If a time frame says \"Used\" then you cannot choose that time as we have someone else there; if you cannot do any of these times then contact:<br>$OpsComm_tmh<br>";$tmh_sorry = "Sorry you Picked a Used time.<br><br>Questions? - Comments? - Problems?<br><b>Contact:</b><br>$OpsComm_tmh<br><br>"; $tmh_success = "Update Complete: Time Selected..<br><br>Questions? - Comments? - Problems?<br><b>Contact:</b><br>$OpsComm_tmh<br><br>";$tmh_success2 = "Update Complete: Recruit has Passed Ten Minutes of ######..<br><br><a href='console.php'>| Your Account |</a><a href='console.php?pid=$pid'>| Manage: TMH Home |</a><br><br>";$tmh_success3 = "Update Complete: Recruit has Failed Ten Minutes of ######..<br><br><a href='console.php'>| Your Account |</a><a href='console.php?pid=$pid'>| Manage: TMH Home |</a><br><br>";$this_saturday = date('l jS F (Y-m-d)', strtotime('this Saturday'));?> here is the class_tmh.php: <?php$time_3 = countTMHtimes("3:00pm EST");$time_35 = countTMHtimes("3:30pm EST");$time_4 = countTMHtimes("4:00pm EST");$time_45 = countTMHtimes("4:30pm EST");$time_5 = countTMHtimes("5:00pm EST");$time_55 = countTMHtimes("5:30pm EST");$time_6 = countTMHtimes("6:00pm EST");$time_65 = countTMHtimes("6:30pm EST");$time_7 = countTMHtimes("7:00pm EST");$time_75 = countTMHtimes("7:30pm EST"); if($time_3 != 1) { $pm3 = "3:00pm EST"; $pm3USED = "Open"; } else { $pm3 = "USED"; $pm3USED = "Used"; }if($time_35 != 1) { $pm35 = "3:30pm EST"; $pm35USED = "Open"; } else { $pm35 = "USED"; $pm35USED = "Used"; }if($time_4 != 1) { $pm4 = "4:00pm EST"; $pm4USED = "Open"; } else { $pm4 = "USED"; $pm4USED = "Used"; }if($time_45 != 1) { $pm45 = "4:30pm EST"; $pm45USED = "Open"; } else { $pm45 = "USED"; $pm45USED = "Used"; }if($time_5 != 1) { $pm5 = "5:00pm EST"; $pm5USED = "Open"; } else { $pm5 = "USED"; $pm5USED = "Used"; }if($time_55 != 1) { $pm55 = "5:30pm EST"; $pm55USED = "Open"; } else { $pm55 = "USED"; $pm55USED = "Used"; }if($time_6 != 1) { $pm6 = "6:00pm EST"; $pm6USED = "Open"; } else { $pm6 = "USED"; $pm6USED = "Used"; }if($time_65 != 1) { $pm65 = "6:30pm EST"; $pm65USED = "Open"; } else { $pm65 = "USED"; $pm65USED = "Used"; }if($time_7 != 1) { $pm7 = "7:00pm EST"; $pm7USED = "Open"; } else { $pm7 = "USED"; $pm7USED = "Used"; }if($time_75 != 1) { $pm75 = "7:30pm EST"; $pm75USED = "Open"; } else { $pm75 = "USED"; $pm75USED = "Used"; }?> and lastly here is the function from the functions page: function getConvertedTime($needed, $timezone, $s_time) {global $dbprefix;$query = "SELECT * FROM {$dbprefix}timezone_convert WHERE tz = '$timezone' AND convert = '$s_time'";$result = mysql_query($query) or die(mysql_error());$row = mysql_fetch_array($result);@extract($row); return $$needed;}
  21. Hello all, This is my first posting on the forums. Here is my question: I want to reset an entire column to zero monthly. Is the possible using Oracle SQL Express 11g? I looked for a way to do it in the Oracle SQL Developer, but I didn't find away to easily do it there. This is for a school project. One of the columns in the table is called monthly sales. That is the column that I want to reset to zero on the 1st of the month. Thanks in advance if anyone can answer this for me.
  22. I'd like to access a database that is on the client side via Javascript and was wondering how to best go about this. I was thinking it may work to use Ajax to call a C# data application, but wondered if that would be most efficient. I suppose PHP would be another alternative, but I prefer working in C# if I can. Thanks!
  23. helloI have a question , I thinking whether we can delete a data in one or three table at once time??How Query fo that ?
  24. i created this section of code to accept a multi award system... i am trying to find a shorter way to run through the check list. <?phpif($submit) {/// Multiple Award Script / Function ///$ga = getHasItInfo($award, $member);$man = $medal_award_number;$ma = getMedalInfo('multi_awardable', $award);$max = getMedalInfo('max_awardable', $award);if($ma == 1 AND $man < $max) { /// Creates a Loop to make sure the award number is correct. /// /// Gets A checks List $check1 = getHasItInfo($award, $member_id); if($check1 > 0) { $tf1 == "T"; } else { $tf1 == "F";} $check2 = getHasItInfo($award.1, $member_id); if($check2 > 0) { $tf2 == "T"; } else { $tf2 == "F";} $check3 = getHasItInfo($award.2, $member_id); if($check3 > 0) { $tf3 == "T"; } else { $tf3 == "F";} $check4 = getHasItInfo($award.3, $member_id); if($check4 > 0) { $tf4 == "T"; } else { $tf4 == "F";} $check5 = getHasItInfo($award.4, $member_id); if($check5 > 0) { $tf5 == "T"; } else { $tf5 == "F";} $check6 = getHasItInfo($award.5, $member_id); if($check6 > 0) { $tf6 == "T"; } else { $tf6 == "F";} $check7 = getHasItInfo($award.6, $member_id); if($check7 > 0) { $tf7 == "T"; } else { $tf7 == "F";} $check8 = getHasItInfo($award.7, $member_id); if($check8 > 0) { $tf8 == "T"; } else { $tf8 == "F";} $check9 = getHasItInfo($award.8, $member_id); if($check9 > 0) { $tf9 == "T"; } else { $tf9 == "F";} $check10 = getHasItInfo($award.9, $member_id); if($check10 > 0) { $tf10 == "T"; } else { $tf10 == "F";} $check11 = getHasItInfo($award.10, $member_id); if($check11 > 0) { $tf11 == "T"; } else { $tf11 == "F";} $check12 = getHasItInfo($award.11, $member_id); if($check12 > 0) { $tf12 == "T"; } else { $tf12 == "F";} $check13 = getHasItInfo($award.12, $member_id); if($check13 > 0) { $tf13 == "T"; } else { $tf13 == "F";} $check14 = getHasItInfo($award.13, $member_id); if($check14 > 0) { $tf14 == "T"; } else { $tf14 == "F";} $check15 = getHasItInfo($award.14, $member_id); if($check15 > 0) { $tf15 == "T"; } else { $tf15 == "F";} $check16 = getHasItInfo($award.15, $member_id); if($check16 > 0) { $tf16 == "T"; } else { $tf16 == "F";} $check17 = getHasItInfo($award.16, $member_id); if($check17 > 0) { $tf17 == "T"; } else { $tf17 == "F";} $check18 = getHasItInfo($award.17, $member_id); if($check18 > 0) { $tf18 == "T"; } else { $tf18 == "F";} $check19 = getHasItInfo($award.18, $member_id); if($check19 > 0) { $tf19 == "T"; } else { $tf19 == "F";} $check20 = getHasItInfo($award.19, $member_id); if($check20 > 0) { $tf20 == "T"; } else { $tf20 == "F";} $check21 = getHasItInfo($award.20, $member_id); if($check21 > 0) { $tf21 == "T"; } else { $tf21 == "F";} $check22 = getHasItInfo($award.21, $member_id); if($check22 > 0) { $tf22 == "T"; } else { $tf22 == "F";} $check23 = getHasItInfo($award.22, $member_id); if($check23 > 0) { $tf23 == "T"; } else { $tf23 == "F";} $check24 = getHasItInfo($award.23, $member_id); if($check24 > 0) { $tf24 == "T"; } else { $tf24 == "F";} $check25 = getHasItInfo($award.24, $member_id); if($check25 > 0) { $tf25 == "T"; } else { $tf25 == "F";} $check26 = getHasItInfo($award.25, $member_id); if($check26 > 0) { $tf26 == "T"; } else { $tf26 == "F";} /// Processes the Check List till the right award number is found to be awarded then ends the search.. if($tf1 == "T" AND $tf2 == "F" AND $tf3 == "F" AND $tf4 == "F" AND $tf5 == "F" AND $tf6 == "F" AND $tf7 == "F" AND $tf8 == "F" AND $tf9 == "F" AND $tf10 == "F" AND $tf11 == "F" AND $tf12 == "F" AND $tf13 == "F" AND $tf14 == "F" AND $tf15 == "F" AND $tf16 == "F" AND $tf17 == "F" AND $tf18 == "F" AND $tf19 == "F" AND $tf20 == "F" AND $tf21 == "F" AND $tf22 == "F" AND $tf23 == "F" AND $tf24 == "F" AND $tf25 == "F" AND $tf26 == "F") { $newAward = ($award+.1); $query = "UPDATE {$dbprefix}medals_members SET medal_award_number = '-1' WHERE medal_id = '$award' AND member_id = '$member'"; $result = mysql_query($query) or die(mysql_error()); $query = "INSERT INTO {$dbprefix}medals_members (medal_id, medal_award_number, medalcat_id, member_id, dateawarded, awarder_id) VALUES ('$newAward', '1', '$awardcat', '$member', '$time', '$awarder')"; $result = mysql_query($query) or die(mysql_error()); $query = "DELETE FROM {$dbprefix}medals_request WHERE id = '$reqid'"; $result = mysql_query($query) or die(mysql_error()); echo " <div style='display: none' id='successBox'> <p align='center'> SUCCESS! -- <br> Award IS a Multi-Aceievable Award so an attachment has been added to this award!<br> Request for Award Was Approved and Deleted! </p> </div> <script type='text/javascript'> popupDialog('Award Request: Approved', 'console.php?pid=$pid&p=ManageAll', 'successBox'); </script> "; } elseif($tf1 == "T" AND $tf2 == "T" AND $tf3 == "F" AND $tf4 == "F" AND $tf5 == "F" AND $tf6 == "F" AND $tf7 == "F" AND $tf8 == "F" AND $tf9 == "F" AND $tf10 == "F" AND $tf11 == "F" AND $tf12 == "F" AND $tf13 == "F" AND $tf14 == "F" AND $tf15 == "F" AND $tf16 == "F" AND $tf17 == "F" AND $tf18 == "F" AND $tf19 == "F" AND $tf20 == "F" AND $tf21 == "F" AND $tf22 == "F" AND $tf23 == "F" AND $tf24 == "F" AND $tf25 == "F" AND $tf26 == "F") { $newAward = ($award+.2); $query = "UPDATE {$dbprefix}medals_members SET medal_award_number = '-1' WHERE medal_id = '$award' AND member_id = '$member'"; $result = mysql_query($query) or die(mysql_error()); $query = "INSERT INTO {$dbprefix}medals_members (medal_id, medal_award_number, medalcat_id, member_id, dateawarded, awarder_id) VALUES ('$newAward', '1', '$awardcat', '$member', '$time', '$awarder')"; $result = mysql_query($query) or die(mysql_error()); $query = "DELETE FROM {$dbprefix}medals_request WHERE id = '$reqid'"; $result = mysql_query($query) or die(mysql_error()); echo " <div style='display: none' id='successBox'> <p align='center'> SUCCESS! -- <br> Award IS a Multi-Aceievable Award so an attachment has been added to this award!<br> Request for Award Was Approved and Deleted! </p> </div> <script type='text/javascript'> popupDialog('Award Request: Approved', 'console.php?pid=$pid&p=ManageAll', 'successBox'); </script> "; } elseif($tf1 == "T" AND $tf2 == "T" AND $tf3 == "T" AND $tf4 == "F" AND $tf5 == "F" AND $tf6 == "F" AND $tf7 == "F" AND $tf8 == "F" AND $tf9 == "F" AND $tf10 == "F" AND $tf11 == "F" AND $tf12 == "F" AND $tf13 == "F" AND $tf14 == "F" AND $tf15 == "F" AND $tf16 == "F" AND $tf17 == "F" AND $tf18 == "F" AND $tf19 == "F" AND $tf20 == "F" AND $tf21 == "F" AND $tf22 == "F" AND $tf23 == "F" AND $tf24 == "F" AND $tf25 == "F" AND $tf26 == "F") { $newAward = ($award+.3); $query = "UPDATE {$dbprefix}medals_members SET medal_award_number = '-1' WHERE medal_id = '$award' AND member_id = '$member'"; $result = mysql_query($query) or die(mysql_error()); $query = "INSERT INTO {$dbprefix}medals_members (medal_id, medal_award_number, medalcat_id, member_id, dateawarded, awarder_id) VALUES ('$newAward', '1', '$awardcat', '$member', '$time', '$awarder')"; $result = mysql_query($query) or die(mysql_error()); $query = "DELETE FROM {$dbprefix}medals_request WHERE id = '$reqid'"; $result = mysql_query($query) or die(mysql_error()); echo " <div style='display: none' id='successBox'> <p align='center'> SUCCESS! -- <br> Award IS a Multi-Aceievable Award so an attachment has been added to this award!<br> Request for Award Was Approved and Deleted! </p> </div> <script type='text/javascript'> popupDialog('Award Request: Approved', 'console.php?pid=$pid&p=ManageAll', 'successBox'); </script> "; } elseif($tf1 == "T" AND $tf2 == "T" AND $tf3 == "T" AND $tf4 == "T" AND $tf5 == "F" AND $tf6 == "F" AND $tf7 == "F" AND $tf8 == "F" AND $tf9 == "F" AND $tf10 == "F" AND $tf11 == "F" AND $tf12 == "F" AND $tf13 == "F" AND $tf14 == "F" AND $tf15 == "F" AND $tf16 == "F" AND $tf17 == "F" AND $tf18 == "F" AND $tf19 == "F" AND $tf20 == "F" AND $tf21 == "F" AND $tf22 == "F" AND $tf23 == "F" AND $tf24 == "F" AND $tf25 == "F" AND $tf26 == "F") { $newAward = ($award+.4); $query = "UPDATE {$dbprefix}medals_members SET medal_award_number = '-1' WHERE medal_id = '$award' AND member_id = '$member'"; $result = mysql_query($query) or die(mysql_error()); $query = "INSERT INTO {$dbprefix}medals_members (medal_id, medal_award_number, medalcat_id, member_id, dateawarded, awarder_id) VALUES ('$newAward', '1', '$awardcat', '$member', '$time', '$awarder')"; $result = mysql_query($query) or die(mysql_error()); $query = "DELETE FROM {$dbprefix}medals_request WHERE id = '$reqid'"; $result = mysql_query($query) or die(mysql_error()); echo " <div style='display: none' id='successBox'> <p align='center'> SUCCESS! -- <br> Award IS a Multi-Aceievable Award so an attachment has been added to this award!<br> Request for Award Was Approved and Deleted! </p> </div> <script type='text/javascript'> popupDialog('Award Request: Approved', 'console.php?pid=$pid&p=ManageAll', 'successBox'); </script> "; } elseif($tf1 == "T" AND $tf2 == "T" AND $tf3 == "T" AND $tf4 == "T" AND $tf5 == "T" AND $tf6 == "F" AND $tf7 == "F" AND $tf8 == "F" AND $tf9 == "F" AND $tf10 == "F" AND $tf11 == "F" AND $tf12 == "F" AND $tf13 == "F" AND $tf14 == "F" AND $tf15 == "F" AND $tf16 == "F" AND $tf17 == "F" AND $tf18 == "F" AND $tf19 == "F" AND $tf20 == "F" AND $tf21 == "F" AND $tf22 == "F" AND $tf23 == "F" AND $tf24 == "F" AND $tf25 == "F" AND $tf26 == "F") { $newAward = ($award+.5); $query = "UPDATE {$dbprefix}medals_members SET medal_award_number = '-1' WHERE medal_id = '$award' AND member_id = '$member'"; $result = mysql_query($query) or die(mysql_error()); $query = "INSERT INTO {$dbprefix}medals_members (medal_id, medal_award_number, medalcat_id, member_id, dateawarded, awarder_id) VALUES ('$newAward', '1', '$awardcat', '$member', '$time', '$awarder')"; $result = mysql_query($query) or die(mysql_error()); $query = "DELETE FROM {$dbprefix}medals_request WHERE id = '$reqid'"; $result = mysql_query($query) or die(mysql_error()); echo " <div style='display: none' id='successBox'> <p align='center'> SUCCESS! -- <br> Award IS a Multi-Aceievable Award so an attachment has been added to this award!<br> Request for Award Was Approved and Deleted! </p> </div> <script type='text/javascript'> popupDialog('Award Request: Approved', 'console.php?pid=$pid&p=ManageAll', 'successBox'); </script> "; } elseif($tf1 == "T" AND $tf2 == "T" AND $tf3 == "T" AND $tf4 == "T" AND $tf5 == "T" AND $tf6 == "T" AND $tf7 == "F" AND $tf8 == "F" AND $tf9 == "F" AND $tf10 == "F" AND $tf11 == "F" AND $tf12 == "F" AND $tf13 == "F" AND $tf14 == "F" AND $tf15 == "F" AND $tf16 == "F" AND $tf17 == "F" AND $tf18 == "F" AND $tf19 == "F" AND $tf20 == "F" AND $tf21 == "F" AND $tf22 == "F" AND $tf23 == "F" AND $tf24 == "F" AND $tf25 == "F" AND $tf26 == "F") { $newAward = ($award+.6); $query = "UPDATE {$dbprefix}medals_members SET medal_award_number = '-1' WHERE medal_id = '$award' AND member_id = '$member'"; $result = mysql_query($query) or die(mysql_error()); $query = "INSERT INTO {$dbprefix}medals_members (medal_id, medal_award_number, medalcat_id, member_id, dateawarded, awarder_id) VALUES ('$newAward', '1', '$awardcat', '$member', '$time', '$awarder')"; $result = mysql_query($query) or die(mysql_error()); $query = "DELETE FROM {$dbprefix}medals_request WHERE id = '$reqid'"; $result = mysql_query($query) or die(mysql_error()); echo " <div style='display: none' id='successBox'> <p align='center'> SUCCESS! -- <br> Award IS a Multi-Aceievable Award so an attachment has been added to this award!<br> Request for Award Was Approved and Deleted! </p> </div> <script type='text/javascript'> popupDialog('Award Request: Approved', 'console.php?pid=$pid&p=ManageAll', 'successBox'); </script> "; } elseif($tf1 == "T" AND $tf2 == "T" AND $tf3 == "T" AND $tf4 == "T" AND $tf5 == "T" AND $tf6 == "T" AND $tf7 == "T" AND $tf8 == "F" AND $tf9 == "F" AND $tf10 == "F" AND $tf11 == "F" AND $tf12 == "F" AND $tf13 == "F" AND $tf14 == "F" AND $tf15 == "F" AND $tf16 == "F" AND $tf17 == "F" AND $tf18 == "F" AND $tf19 == "F" AND $tf20 == "F" AND $tf21 == "F" AND $tf22 == "F" AND $tf23 == "F" AND $tf24 == "F" AND $tf25 == "F" AND $tf26 == "F") { $newAward = ($award+.7); $query = "UPDATE {$dbprefix}medals_members SET medal_award_number = '-1' WHERE medal_id = '$award' AND member_id = '$member'"; $result = mysql_query($query) or die(mysql_error()); $query = "INSERT INTO {$dbprefix}medals_members (medal_id, medal_award_number, medalcat_id, member_id, dateawarded, awarder_id) VALUES ('$newAward', '1', '$awardcat', '$member', '$time', '$awarder')"; $result = mysql_query($query) or die(mysql_error()); $query = "DELETE FROM {$dbprefix}medals_request WHERE id = '$reqid'"; $result = mysql_query($query) or die(mysql_error()); echo " <div style='display: none' id='successBox'> <p align='center'> SUCCESS! -- <br> Award IS a Multi-Aceievable Award so an attachment has been added to this award!<br> Request for Award Was Approved and Deleted! </p> </div> <script type='text/javascript'> popupDialog('Award Request: Approved', 'console.php?pid=$pid&p=ManageAll', 'successBox'); </script> "; } elseif($tf1 == "T" AND $tf2 == "T" AND $tf3 == "T" AND $tf4 == "T" AND $tf5 == "T" AND $tf6 == "T" AND $tf7 == "T" AND $tf8 == "T" AND $tf9 == "F" AND $tf10 == "F" AND $tf11 == "F" AND $tf12 == "F" AND $tf13 == "F" AND $tf14 == "F" AND $tf15 == "F" AND $tf16 == "F" AND $tf17 == "F" AND $tf18 == "F" AND $tf19 == "F" AND $tf20 == "F" AND $tf21 == "F" AND $tf22 == "F" AND $tf23 == "F" AND $tf24 == "F" AND $tf25 == "F" AND $tf26 == "F") { $newAward = ($award+.8); $query = "UPDATE {$dbprefix}medals_members SET medal_award_number = '-1' WHERE medal_id = '$award' AND member_id = '$member'"; $result = mysql_query($query) or die(mysql_error()); $query = "INSERT INTO {$dbprefix}medals_members (medal_id, medal_award_number, medalcat_id, member_id, dateawarded, awarder_id) VALUES ('$newAward', '1', '$awardcat', '$member', '$time', '$awarder')"; $result = mysql_query($query) or die(mysql_error()); $query = "DELETE FROM {$dbprefix}medals_request WHERE id = '$reqid'"; $result = mysql_query($query) or die(mysql_error()); echo " <div style='display: none' id='successBox'> <p align='center'> SUCCESS! -- <br> Award IS a Multi-Aceievable Award so an attachment has been added to this award!<br> Request for Award Was Approved and Deleted! </p> </div> <script type='text/javascript'> popupDialog('Award Request: Approved', 'console.php?pid=$pid&p=ManageAll', 'successBox'); </script> "; } elseif($tf1 == "T" AND $tf2 == "T" AND $tf3 == "T" AND $tf4 == "T" AND $tf5 == "T" AND $tf6 == "T" AND $tf7 == "F" AND $tf8 == "T" AND $tf9 == "T" AND $tf10 == "F" AND $tf11 == "F" AND $tf12 == "F" AND $tf13 == "F" AND $tf14 == "F" AND $tf15 == "F" AND $tf16 == "F" AND $tf17 == "F" AND $tf18 == "F" AND $tf19 == "F" AND $tf20 == "F" AND $tf21 == "F" AND $tf22 == "F" AND $tf23 == "F" AND $tf24 == "F" AND $tf25 == "F" AND $tf26 == "F") { $newAward = ($award+.9; $query = "UPDATE {$dbprefix}medals_members SET medal_award_number = '-1' WHERE medal_id = '$award' AND member_id = '$member'"; $result = mysql_query($query) or die(mysql_error()); $query = "INSERT INTO {$dbprefix}medals_members (medal_id, medal_award_number, medalcat_id, member_id, dateawarded, awarder_id) VALUES ('$newAward', '1', '$awardcat', '$member', '$time', '$awarder')"; $result = mysql_query($query) or die(mysql_error()); $query = "DELETE FROM {$dbprefix}medals_request WHERE id = '$reqid'"; $result = mysql_query($query) or die(mysql_error()); echo " <div style='display: none' id='successBox'> <p align='center'> SUCCESS! -- <br> Award IS a Multi-Aceievable Award so an attachment has been added to this award!<br> Request for Award Was Approved and Deleted! </p> </div> <script type='text/javascript'> popupDialog('Award Request: Approved', 'console.php?pid=$pid&p=ManageAll', 'successBox'); </script> "; } elseif($tf1 == "T" AND $tf2 == "T" AND $tf3 == "T" AND $tf4 == "T" AND $tf5 == "T" AND $tf6 == "T" AND $tf7 == "T" AND $tf8 == "T" AND $tf9 == "T" AND $tf10 == "T" AND $tf11 == "F" AND $tf12 == "F" AND $tf13 == "F" AND $tf14 == "F" AND $tf15 == "F" AND $tf16 == "F" AND $tf17 == "F" AND $tf18 == "F" AND $tf19 == "F" AND $tf20 == "F" AND $tf21 == "F" AND $tf22 == "F" AND $tf23 == "F" AND $tf24 == "F" AND $tf25 == "F" AND $tf26 == "F") { $newAward = ($award+.10); $query = "UPDATE {$dbprefix}medals_members SET medal_award_number = '-1' WHERE medal_id = '$award' AND member_id = '$member'"; $result = mysql_query($query) or die(mysql_error()); $query = "INSERT INTO {$dbprefix}medals_members (medal_id, medal_award_number, medalcat_id, member_id, dateawarded, awarder_id) VALUES ('$newAward', '1', '$awardcat', '$member', '$time', '$awarder')"; $result = mysql_query($query) or die(mysql_error()); $query = "DELETE FROM {$dbprefix}medals_request WHERE id = '$reqid'"; $result = mysql_query($query) or die(mysql_error()); echo " <div style='display: none' id='successBox'> <p align='center'> SUCCESS! -- <br> Award IS a Multi-Aceievable Award so an attachment has been added to this award!<br> Request for Award Was Approved and Deleted! </p> </div> <script type='text/javascript'> popupDialog('Award Request: Approved', 'console.php?pid=$pid&p=ManageAll', 'successBox'); </script> "; } elseif($tf1 == "T" AND $tf2 == "T" AND $tf3 == "T" AND $tf4 == "T" AND $tf5 == "T" AND $tf6 == "T" AND $tf7 == "T" AND $tf8 == "T" AND $tf9 == "T" AND $tf10 == "T" AND $tf11 == "T" AND $tf12 == "F" AND $tf13 == "F" AND $tf14 == "F" AND $tf15 == "F" AND $tf16 == "F" AND $tf17 == "F" AND $tf18 == "F" AND $tf19 == "F" AND $tf20 == "F" AND $tf21 == "F" AND $tf22 == "F" AND $tf23 == "F" AND $tf24 == "F" AND $tf25 == "F" AND $tf26 == "F") { $newAward = ($award+.11); $query = "UPDATE {$dbprefix}medals_members SET medal_award_number = '-1' WHERE medal_id = '$award' AND member_id = '$member'"; $result = mysql_query($query) or die(mysql_error()); $query = "INSERT INTO {$dbprefix}medals_members (medal_id, medal_award_number, medalcat_id, member_id, dateawarded, awarder_id) VALUES ('$newAward', '1', '$awardcat', '$member', '$time', '$awarder')"; $result = mysql_query($query) or die(mysql_error()); $query = "DELETE FROM {$dbprefix}medals_request WHERE id = '$reqid'"; $result = mysql_query($query) or die(mysql_error()); echo " <div style='display: none' id='successBox'> <p align='center'> SUCCESS! -- <br> Award IS a Multi-Aceievable Award so an attachment has been added to this award!<br> Request for Award Was Approved and Deleted! </p> </div> <script type='text/javascript'> popupDialog('Award Request: Approved', 'console.php?pid=$pid&p=ManageAll', 'successBox'); </script> "; } elseif($tf1 == "T" AND $tf2 == "T" AND $tf3 == "T" AND $tf4 == "T" AND $tf5 == "T" AND $tf6 == "T" AND $tf7 == "T" AND $tf8 == "T" AND $tf9 == "T" AND $tf10 == "T" AND $tf11 == "T" AND $tf12 == "T" AND $tf13 == "F" AND $tf14 == "F" AND $tf15 == "F" AND $tf16 == "F" AND $tf17 == "F" AND $tf18 == "F" AND $tf19 == "F" AND $tf20 == "F" AND $tf21 == "F" AND $tf22 == "F" AND $tf23 == "F" AND $tf24 == "F" AND $tf25 == "F" AND $tf26 == "F") { $newAward = ($award+.12); $query = "UPDATE {$dbprefix}medals_members SET medal_award_number = '-1' WHERE medal_id = '$award' AND member_id = '$member'"; $result = mysql_query($query) or die(mysql_error()); $query = "INSERT INTO {$dbprefix}medals_members (medal_id, medal_award_number, medalcat_id, member_id, dateawarded, awarder_id) VALUES ('$newAward', '1', '$awardcat', '$member', '$time', '$awarder')"; $result = mysql_query($query) or die(mysql_error()); $query = "DELETE FROM {$dbprefix}medals_request WHERE id = '$reqid'"; $result = mysql_query($query) or die(mysql_error()); echo " <div style='display: none' id='successBox'> <p align='center'> SUCCESS! -- <br> Award IS a Multi-Aceievable Award so an attachment has been added to this award!<br> Request for Award Was Approved and Deleted! </p> </div> <script type='text/javascript'> popupDialog('Award Request: Approved', 'console.php?pid=$pid&p=ManageAll', 'successBox'); </script> "; } elseif($tf1 == "T" AND $tf2 == "T" AND $tf3 == "T" AND $tf4 == "T" AND $tf5 == "T" AND $tf6 == "T" AND $tf7 == "T" AND $tf8 == "T" AND $tf9 == "T" AND $tf10 == "T" AND $tf11 == "T" AND $tf12 == "T" AND $tf13 == "T" AND $tf14 == "F" AND $tf15 == "F" AND $tf16 == "F" AND $tf17 == "F" AND $tf18 == "F" AND $tf19 == "F" AND $tf20 == "F" AND $tf21 == "F" AND $tf22 == "F" AND $tf23 == "F" AND $tf24 == "F" AND $tf25 == "F" AND $tf26 == "F") { $newAward = ($award+.13); $query = "UPDATE {$dbprefix}medals_members SET medal_award_number = '-1' WHERE medal_id = '$award' AND member_id = '$member'"; $result = mysql_query($query) or die(mysql_error()); $query = "INSERT INTO {$dbprefix}medals_members (medal_id, medal_award_number, medalcat_id, member_id, dateawarded, awarder_id) VALUES ('$newAward', '1', '$awardcat', '$member', '$time', '$awarder')"; $result = mysql_query($query) or die(mysql_error()); $query = "DELETE FROM {$dbprefix}medals_request WHERE id = '$reqid'"; $result = mysql_query($query) or die(mysql_error()); echo " <div style='display: none' id='successBox'> <p align='center'> SUCCESS! -- <br> Award IS a Multi-Aceievable Award so an attachment has been added to this award!<br> Request for Award Was Approved and Deleted! </p> </div> <script type='text/javascript'> popupDialog('Award Request: Approved', 'console.php?pid=$pid&p=ManageAll', 'successBox'); </script> "; } elseif($tf1 == "T" AND $tf2 == "T" AND $tf3 == "T" AND $tf4 == "T" AND $tf5 == "T" AND $tf6 == "T" AND $tf7 == "T" AND $tf8 == "T" AND $tf9 == "T" AND $tf10 == "T" AND $tf11 == "T" AND $tf12 == "T" AND $tf13 == "T" AND $tf14 == "T" AND $tf15 == "F" AND $tf16 == "F" AND $tf17 == "F" AND $tf18 == "F" AND $tf19 == "F" AND $tf20 == "F" AND $tf21 == "F" AND $tf22 == "F" AND $tf23 == "F" AND $tf24 == "F" AND $tf25 == "F" AND $tf26 == "F") { $newAward = ($award+.14); $query = "UPDATE {$dbprefix}medals_members SET medal_award_number = '-1' WHERE medal_id = '$award' AND member_id = '$member'"; $result = mysql_query($query) or die(mysql_error()); $query = "INSERT INTO {$dbprefix}medals_members (medal_id, medal_award_number, medalcat_id, member_id, dateawarded, awarder_id) VALUES ('$newAward', '1', '$awardcat', '$member', '$time', '$awarder')"; $result = mysql_query($query) or die(mysql_error()); $query = "DELETE FROM {$dbprefix}medals_request WHERE id = '$reqid'"; $result = mysql_query($query) or die(mysql_error()); echo " <div style='display: none' id='successBox'> <p align='center'> SUCCESS! -- <br> Award IS a Multi-Aceievable Award so an attachment has been added to this award!<br> Request for Award Was Approved and Deleted! </p> </div> <script type='text/javascript'> popupDialog('Award Request: Approved', 'console.php?pid=$pid&p=ManageAll', 'successBox'); </script> "; } elseif($tf1 == "T" AND $tf2 == "T" AND $tf3 == "T" AND $tf4 == "T" AND $tf5 == "T" AND $tf6 == "T" AND $tf7 == "T" AND $tf8 == "T" AND $tf9 == "T" AND $tf10 == "T" AND $tf11 == "T" AND $tf12 == "T" AND $tf13 == "T" AND $tf14 == "T" AND $tf15 == "T" AND $tf16 == "F" AND $tf17 == "F" AND $tf18 == "F" AND $tf19 == "F" AND $tf20 == "F" AND $tf21 == "F" AND $tf22 == "F" AND $tf23 == "F" AND $tf24 == "F" AND $tf25 == "F" AND $tf26 == "F") { $newAward = ($award+.15); $query = "UPDATE {$dbprefix}medals_members SET medal_award_number = '-1' WHERE medal_id = '$award' AND member_id = '$member'"; $result = mysql_query($query) or die(mysql_error()); $query = "INSERT INTO {$dbprefix}medals_members (medal_id, medal_award_number, medalcat_id, member_id, dateawarded, awarder_id) VALUES ('$newAward', '1', '$awardcat', '$member', '$time', '$awarder')"; $result = mysql_query($query) or die(mysql_error()); $query = "DELETE FROM {$dbprefix}medals_request WHERE id = '$reqid'"; $result = mysql_query($query) or die(mysql_error()); echo " <div style='display: none' id='successBox'> <p align='center'> SUCCESS! -- <br> Award IS a Multi-Aceievable Award so an attachment has been added to this award!<br> Request for Award Was Approved and Deleted! </p> </div> <script type='text/javascript'> popupDialog('Award Request: Approved', 'console.php?pid=$pid&p=ManageAll', 'successBox'); </script> "; } elseif($tf1 == "T" AND $tf2 == "T" AND $tf3 == "T" AND $tf4 == "T" AND $tf5 == "T" AND $tf6 == "T" AND $tf7 == "T" AND $tf8 == "T" AND $tf9 == "T" AND $tf10 == "T" AND $tf11 == "T" AND $tf12 == "T" AND $tf13 == "T" AND $tf14 == "T" AND $tf15 == "T" AND $tf16 == "T" AND $tf17 == "F" AND $tf18 == "F" AND $tf19 == "F" AND $tf20 == "F" AND $tf21 == "F" AND $tf22 == "F" AND $tf23 == "F" AND $tf24 == "F" AND $tf25 == "F" AND $tf26 == "F") { $newAward = ($award+.16); $query = "UPDATE {$dbprefix}medals_members SET medal_award_number = '-1' WHERE medal_id = '$award' AND member_id = '$member'"; $result = mysql_query($query) or die(mysql_error()); $query = "INSERT INTO {$dbprefix}medals_members (medal_id, medal_award_number, medalcat_id, member_id, dateawarded, awarder_id) VALUES ('$newAward', '1', '$awardcat', '$member', '$time', '$awarder')"; $result = mysql_query($query) or die(mysql_error()); $query = "DELETE FROM {$dbprefix}medals_request WHERE id = '$reqid'"; $result = mysql_query($query) or die(mysql_error()); echo " <div style='display: none' id='successBox'> <p align='center'> SUCCESS! -- <br> Award IS a Multi-Aceievable Award so an attachment has been added to this award!<br> Request for Award Was Approved and Deleted! </p> </div> <script type='text/javascript'> popupDialog('Award Request: Approved', 'console.php?pid=$pid&p=ManageAll', 'successBox'); </script> "; } elseif($tf1 == "T" AND $tf2 == "T" AND $tf3 == "T" AND $tf4 == "T" AND $tf5 == "T" AND $tf6 == "T" AND $tf7 == "T" AND $tf8 == "T" AND $tf9 == "T" AND $tf10 == "T" AND $tf11 == "T" AND $tf12 == "T" AND $tf13 == "T" AND $tf14 == "T" AND $tf15 == "T" AND $tf16 == "T" AND $tf17 == "T" AND $tf18 == "F" AND $tf19 == "F" AND $tf20 == "F" AND $tf21 == "F" AND $tf22 == "F" AND $tf23 == "F" AND $tf24 == "F" AND $tf25 == "F" AND $tf26 == "F") { $newAward = ($award+.17); $query = "UPDATE {$dbprefix}medals_members SET medal_award_number = '-1' WHERE medal_id = '$award' AND member_id = '$member'"; $result = mysql_query($query) or die(mysql_error()); $query = "INSERT INTO {$dbprefix}medals_members (medal_id, medal_award_number, medalcat_id, member_id, dateawarded, awarder_id) VALUES ('$newAward', '1', '$awardcat', '$member', '$time', '$awarder')"; $result = mysql_query($query) or die(mysql_error()); $query = "DELETE FROM {$dbprefix}medals_request WHERE id = '$reqid'"; $result = mysql_query($query) or die(mysql_error()); echo " <div style='display: none' id='successBox'> <p align='center'> SUCCESS! -- <br> Award IS a Multi-Aceievable Award so an attachment has been added to this award!<br> Request for Award Was Approved and Deleted! </p> </div> <script type='text/javascript'> popupDialog('Award Request: Approved', 'console.php?pid=$pid&p=ManageAll', 'successBox'); </script> "; } elseif($tf1 == "T" AND $tf2 == "T" AND $tf3 == "T" AND $tf4 == "T" AND $tf5 == "T" AND $tf6 == "T" AND $tf7 == "T" AND $tf8 == "T" AND $tf9 == "T" AND $tf10 == "T" AND $tf11 == "T" AND $tf12 == "T" AND $tf13 == "T" AND $tf14 == "T" AND $tf15 == "T" AND $tf16 == "T" AND $tf17 == "T" AND $tf18 == "T" AND $tf19 == "F" AND $tf20 == "F" AND $tf21 == "F" AND $tf22 == "F" AND $tf23 == "F" AND $tf24 == "F" AND $tf25 == "F" AND $tf26 == "F") { $newAward = ($award+.18); $query = "UPDATE {$dbprefix}medals_members SET medal_award_number = '-1' WHERE medal_id = '$award' AND member_id = '$member'"; $result = mysql_query($query) or die(mysql_error()); $query = "INSERT INTO {$dbprefix}medals_members (medal_id, medal_award_number, medalcat_id, member_id, dateawarded, awarder_id) VALUES ('$newAward', '1', '$awardcat', '$member', '$time', '$awarder')"; $result = mysql_query($query) or die(mysql_error()); $query = "DELETE FROM {$dbprefix}medals_request WHERE id = '$reqid'"; $result = mysql_query($query) or die(mysql_error()); echo " <div style='display: none' id='successBox'> <p align='center'> SUCCESS! -- <br> Award IS a Multi-Aceievable Award so an attachment has been added to this award!<br> Request for Award Was Approved and Deleted! </p> </div> <script type='text/javascript'> popupDialog('Award Request: Approved', 'console.php?pid=$pid&p=ManageAll', 'successBox'); </script> "; } elseif($tf1 == "T" AND $tf2 == "T" AND $tf3 == "T" AND $tf4 == "T" AND $tf5 == "T" AND $tf6 == "T" AND $tf7 == "T" AND $tf8 == "T" AND $tf9 == "T" AND $tf10 == "T" AND $tf11 == "T" AND $tf12 == "T" AND $tf13 == "T" AND $tf14 == "T" AND $tf15 == "T" AND $tf16 == "T" AND $tf17 == "T" AND $tf18 == "T" AND $tf19 == "T" AND $tf20 == "F" AND $tf21 == "F" AND $tf22 == "F" AND $tf23 == "F" AND $tf24 == "F" AND $tf25 == "F" AND $tf26 == "F") { $newAward = ($award+.19); $query = "UPDATE {$dbprefix}medals_members SET medal_award_number = '-1' WHERE medal_id = '$award' AND member_id = '$member'"; $result = mysql_query($query) or die(mysql_error()); $query = "INSERT INTO {$dbprefix}medals_members (medal_id, medal_award_number, medalcat_id, member_id, dateawarded, awarder_id) VALUES ('$newAward', '1', '$awardcat', '$member', '$time', '$awarder')"; $result = mysql_query($query) or die(mysql_error()); $query = "DELETE FROM {$dbprefix}medals_request WHERE id = '$reqid'"; $result = mysql_query($query) or die(mysql_error()); echo " <div style='display: none' id='successBox'> <p align='center'> SUCCESS! -- <br> Award IS a Multi-Aceievable Award so an attachment has been added to this award!<br> Request for Award Was Approved and Deleted! </p> </div> <script type='text/javascript'> popupDialog('Award Request: Approved', 'console.php?pid=$pid&p=ManageAll', 'successBox'); </script> "; } elseif($tf1 == "T" AND $tf2 == "T" AND $tf3 == "T" AND $tf4 == "T" AND $tf5 == "T" AND $tf6 == "T" AND $tf7 == "T" AND $tf8 == "T" AND $tf9 == "T" AND $tf10 == "T" AND $tf11 == "T" AND $tf12 == "T" AND $tf13 == "T" AND $tf14 == "T" AND $tf15 == "T" AND $tf16 == "T" AND $tf17 == "T" AND $tf18 == "T" AND $tf19 == "T" AND $tf20 == "T" AND $tf21 == "F" AND $tf22 == "F" AND $tf23 == "F" AND $tf24 == "F" AND $tf25 == "F" AND $tf26 == "F") { $newAward = ($award+.20); $query = "UPDATE {$dbprefix}medals_members SET medal_award_number = '-1' WHERE medal_id = '$award' AND member_id = '$member'"; $result = mysql_query($query) or die(mysql_error()); $query = "INSERT INTO {$dbprefix}medals_members (medal_id, medal_award_number, medalcat_id, member_id, dateawarded, awarder_id) VALUES ('$newAward', '1', '$awardcat', '$member', '$time', '$awarder')"; $result = mysql_query($query) or die(mysql_error()); $query = "DELETE FROM {$dbprefix}medals_request WHERE id = '$reqid'"; $result = mysql_query($query) or die(mysql_error()); echo " <div style='display: none' id='successBox'> <p align='center'> SUCCESS! -- <br> Award IS a Multi-Aceievable Award so an attachment has been added to this award!<br> Request for Award Was Approved and Deleted! </p> </div> <script type='text/javascript'> popupDialog('Award Request: Approved', 'console.php?pid=$pid&p=ManageAll', 'successBox'); </script> "; } elseif($tf1 == "T" AND $tf2 == "T" AND $tf3 == "T" AND $tf4 == "T" AND $tf5 == "T" AND $tf6 == "T" AND $tf7 == "T" AND $tf8 == "T" AND $tf9 == "T" AND $tf10 == "T" AND $tf11 == "T" AND $tf12 == "T" AND $tf13 == "T" AND $tf14 == "T" AND $tf15 == "T" AND $tf16 == "T" AND $tf17 == "T" AND $tf18 == "T" AND $tf19 == "T" AND $tf20 == "T" AND $tf21 == "T" AND $tf22 == "F" AND $tf23 == "F" AND $tf24 == "F" AND $tf25 == "F" AND $tf26 == "F") { $newAward = ($award+.21); $query = "UPDATE {$dbprefix}medals_members SET medal_award_number = '-1' WHERE medal_id = '$award' AND member_id = '$member'"; $result = mysql_query($query) or die(mysql_error()); $query = "INSERT INTO {$dbprefix}medals_members (medal_id, medal_award_number, medalcat_id, member_id, dateawarded, awarder_id) VALUES ('$newAward', '1', '$awardcat', '$member', '$time', '$awarder')"; $result = mysql_query($query) or die(mysql_error()); $query = "DELETE FROM {$dbprefix}medals_request WHERE id = '$reqid'"; $result = mysql_query($query) or die(mysql_error()); echo " <div style='display: none' id='successBox'> <p align='center'> SUCCESS! -- <br> Award IS a Multi-Aceievable Award so an attachment has been added to this award!<br> Request for Award Was Approved and Deleted! </p> </div> <script type='text/javascript'> popupDialog('Award Request: Approved', 'console.php?pid=$pid&p=ManageAll', 'successBox'); </script> "; } elseif($tf1 == "T" AND $tf2 == "T" AND $tf3 == "T" AND $tf4 == "T" AND $tf5 == "T" AND $tf6 == "T" AND $tf7 == "T" AND $tf8 == "T" AND $tf9 == "T" AND $tf10 == "T" AND $tf11 == "T" AND $tf12 == "T" AND $tf13 == "T" AND $tf14 == "T" AND $tf15 == "T" AND $tf16 == "T" AND $tf17 == "T" AND $tf18 == "T" AND $tf19 == "T" AND $tf20 == "T" AND $tf21 == "T" AND $tf22 == "T" AND $tf23 == "F" AND $tf24 == "F" AND $tf25 == "F" AND $tf26 == "F") { $newAward = ($award+.22); $query = "UPDATE {$dbprefix}medals_members SET medal_award_number = '-1' WHERE medal_id = '$award' AND member_id = '$member'"; $result = mysql_query($query) or die(mysql_error()); $query = "INSERT INTO {$dbprefix}medals_members (medal_id, medal_award_number, medalcat_id, member_id, dateawarded, awarder_id) VALUES ('$newAward', '1', '$awardcat', '$member', '$time', '$awarder')"; $result = mysql_query($query) or die(mysql_error()); $query = "DELETE FROM {$dbprefix}medals_request WHERE id = '$reqid'"; $result = mysql_query($query) or die(mysql_error()); echo " <div style='display: none' id='successBox'> <p align='center'> SUCCESS! -- <br> Award IS a Multi-Aceievable Award so an attachment has been added to this award!<br> Request for Award Was Approved and Deleted! </p> </div> <script type='text/javascript'> popupDialog('Award Request: Approved', 'console.php?pid=$pid&p=ManageAll', 'successBox'); </script> "; } elseif($tf1 == "T" AND $tf2 == "T" AND $tf3 == "T" AND $tf4 == "T" AND $tf5 == "T" AND $tf6 == "T" AND $tf7 == "T" AND $tf8 == "T" AND $tf9 == "T" AND $tf10 == "T" AND $tf11 == "T" AND $tf12 == "T" AND $tf13 == "T" AND $tf14 == "T" AND $tf15 == "T" AND $tf16 == "T" AND $tf17 == "T" AND $tf18 == "T" AND $tf19 == "T" AND $tf20 == "T" AND $tf21 == "T" AND $tf22 == "T" AND $tf23 == "T" AND $tf24 == "F" AND $tf25 == "F" AND $tf26 == "F") { $newAward = ($award+.23); $query = "UPDATE {$dbprefix}medals_members SET medal_award_number = '-1' WHERE medal_id = '$award' AND member_id = '$member'"; $result = mysql_query($query) or die(mysql_error()); $query = "INSERT INTO {$dbprefix}medals_members (medal_id, medal_award_number, medalcat_id, member_id, dateawarded, awarder_id) VALUES ('$newAward', '1', '$awardcat', '$member', '$time', '$awarder')"; $result = mysql_query($query) or die(mysql_error()); $query = "DELETE FROM {$dbprefix}medals_request WHERE id = '$reqid'"; $result = mysql_query($query) or die(mysql_error()); echo " <div style='display: none' id='successBox'> <p align='center'> SUCCESS! -- <br> Award IS a Multi-Aceievable Award so an attachment has been added to this award!<br> Request for Award Was Approved and Deleted! </p> </div> <script type='text/javascript'> popupDialog('Award Request: Approved', 'console.php?pid=$pid&p=ManageAll', 'successBox'); </script> "; } elseif($tf1 == "T" AND $tf2 == "T" AND $tf3 == "T" AND $tf4 == "T" AND $tf5 == "T" AND $tf6 == "T" AND $tf7 == "T" AND $tf8 == "T" AND $tf9 == "T" AND $tf10 == "T" AND $tf11 == "T" AND $tf12 == "T" AND $tf13 == "T" AND $tf14 == "T" AND $tf15 == "T" AND $tf16 == "T" AND $tf17 == "T" AND $tf18 == "T" AND $tf19 == "T" AND $tf20 == "T" AND $tf21 == "T" AND $tf22 == "T" AND $tf23 == "T" AND $tf24 == "T" AND $tf25 == "F" AND $tf26 == "F") { $newAward = ($award+.24); $query = "UPDATE {$dbprefix}medals_members SET medal_award_number = '-1' WHERE medal_id = '$award' AND member_id = '$member'"; $result = mysql_query($query) or die(mysql_error()); $query = "INSERT INTO {$dbprefix}medals_members (medal_id, medal_award_number, medalcat_id, member_id, dateawarded, awarder_id) VALUES ('$newAward', '1', '$awardcat', '$member', '$time', '$awarder')"; $result = mysql_query($query) or die(mysql_error()); $query = "DELETE FROM {$dbprefix}medals_request WHERE id = '$reqid'"; $result = mysql_query($query) or die(mysql_error()); echo " <div style='display: none' id='successBox'> <p align='center'> SUCCESS! -- <br> Award IS a Multi-Aceievable Award so an attachment has been added to this award!<br> Request for Award Was Approved and Deleted! </p> </div> <script type='text/javascript'> popupDialog('Award Request: Approved', 'console.php?pid=$pid&p=ManageAll', 'successBox'); </script> "; } elseif($tf1 == "T" AND $tf2 == "T" AND $tf3 == "T" AND $tf4 == "T" AND $tf5 == "T" AND $tf6 == "T" AND $tf7 == "T" AND $tf8 == "T" AND $tf9 == "T" AND $tf10 == "T" AND $tf11 == "T" AND $tf12 == "T" AND $tf13 == "T" AND $tf14 == "T" AND $tf15 == "T" AND $tf16 == "T" AND $tf17 == "T" AND $tf18 == "T" AND $tf19 == "T" AND $tf20 == "T" AND $tf21 == "T" AND $tf22 == "T" AND $tf23 == "T" AND $tf24 == "T" AND $tf25 == "T" AND $tf26 == "F") { $newAward = ($award+.25); $query = "UPDATE {$dbprefix}medals_members SET medal_award_number = '-1' WHERE medal_id = '$award' AND member_id = '$member'"; $result = mysql_query($query) or die(mysql_error()); $query = "INSERT INTO {$dbprefix}medals_members (medal_id, medal_award_number, medalcat_id, member_id, dateawarded, awarder_id) VALUES ('$newAward', '1', '$awardcat', '$member', '$time', '$awarder')"; $result = mysql_query($query) or die(mysql_error()); $query = "DELETE FROM {$dbprefix}medals_request WHERE id = '$reqid'"; $result = mysql_query($query) or die(mysql_error()); echo " <div style='display: none' id='successBox'> <p align='center'> SUCCESS! -- <br> Award IS a Multi-Aceievable Award so an attachment has been added to this award!<br> Request for Award Was Approved and Deleted! </p> </div> <script type='text/javascript'> popupDialog('Award Request: Approved', 'console.php?pid=$pid&p=ManageAll', 'successBox'); </script> "; } elseif($tf1 == "T" AND $tf2 == "T" AND $tf3 == "T" AND $tf4 == "T" AND $tf5 == "T" AND $tf6 == "T" AND $tf7 == "T" AND $tf8 == "T" AND $tf9 == "T" AND $tf10 == "T" AND $tf11 == "T" AND $tf12 == "T" AND $tf13 == "T" AND $tf14 == "T" AND $tf15 == "T" AND $tf16 == "T" AND $tf17 == "T" AND $tf18 == "T" AND $tf19 == "T" AND $tf20 == "T" AND $tf21 == "T" AND $tf22 == "T" AND $tf23 == "T" AND $tf24 == "T" AND $tf25 == "T" AND $tf26 == "T") { $newAward = ($award+.26); $query = "UPDATE {$dbprefix}medals_members SET medal_award_number = '-1' WHERE medal_id = '$award' AND member_id = '$member'"; $result = mysql_query($query) or die(mysql_error()); $query = "INSERT INTO {$dbprefix}medals_members (medal_id, medal_award_number, medalcat_id, member_id, dateawarded, awarder_id) VALUES ('$newAward', '1', '$awardcat', '$member', '$time', '$awarder')"; $result = mysql_query($query) or die(mysql_error()); $query = "DELETE FROM {$dbprefix}medals_request WHERE id = '$reqid'"; $result = mysql_query($query) or die(mysql_error()); echo " <div style='display: none' id='successBox'> <p align='center'> SUCCESS! -- <br> Award IS a Multi-Aceievable Award so an attachment has been added to this award!<br> Request for Award Was Approved and Deleted! </p> </div> <script type='text/javascript'> popupDialog('Award Request: Approved', 'console.php?pid=$pid&p=ManageAll', 'successBox'); </script> "; } }elseif($ma != 1) { $query = "DELETE FROM {$dbprefix}medals_request WHERE id = '$reqid'"; $result = mysql_query($query) or die(mysql_error()); echo " <div style='display: none' id='successBox'> <p align='center'> ERROR - Member Already has selected Award. <br> Award IS NOT a Multi-Aceievable Award. <br> Request for Award Was Deined and Deleted! </p> </div> <script type='text/javascript'> popupDialog('Award Request: Error', 'console.php?pid=$pid&p=ManageAll', 'successBox'); </script> ";}elseif($ma == 1 AND $man >= $max) { $query = "DELETE FROM {$dbprefix}medals_request WHERE id = '$reqid'"; $result = mysql_query($query) or die(mysql_error()); echo " <div style='display: none' id='successBox'> <p align='center'> ERROR - Member Already has selected Award.<br> Award IS a Multi-Aceievable Award, but the member has the Maximum Amount allowed.<br> Request for Award Was Deined and Deleted! </p> </div> <script type='text/javascript'> popupDialog('Award Request: Error', 'console.php?pid=$pid&p=ManageAll', 'successBox'); </script> ";}}?>
  25. I created a simple Stored Procedure (SP) that queries a table and renames the column names, and I'm able to push those results out to a CSV file *with* those header names when done manually.But when I try to export the results to a CSV file by running the same SP using xp_cmdshell with bcp, the header row (Col1, Col2, and Col3) does not appear in the resulting CSV file.ORIGINAL TABLE:ColumnName1-----ColumnName2-----ColumnName3Joe Schmo CustomerJane Doe CustomerTim Tiny MusicianQUERY WITHIN SP:SELECT ColumnName1 AS Col1, ColumnName2 AS Col2, ColumnName3 AS Col3FROM TABLENAMEQUERY RESULT:Col1-----Col2-----Col3 <<<<----- WHAT I WANT!Joe Schmo CustomerJane Doe CustomerTiny Tim MusicianHere's the code I'm using within the job:EXEC xp_cmdshell 'bcp "EXEC DATABASENAME.dbo.STOREDPROCEDURENAME" QUERYOUT "\\MYSERVERNAME\files\export.csv" -c -t, -T -S'CSV FILE RESULT USING BCP:Joe Schmo CustomerJane Doe CustomerTim Tiny MusicianAs you can see the headers are missing. What am I doing wrong?
×
×
  • Create New...