Jump to content

Search the Community

Showing results for tags 'sql'.



More search options

  • 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

Calendars

  • Community Calendar

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

Found 200 results

  1. 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?
  2. 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$']
  3. 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?
  4. 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
  5. 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
  6. 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?
  7. 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;}
  8. 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.
  9. 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!
  10. helloI have a question , I thinking whether we can delete a data in one or three table at once time??How Query fo that ?
  11. Nuker_Viper

    Shorter Version

    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> ";}}?>
  12. 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?
  13. Hi. I'm new to the .NET framework. I ran into w3schools demo: http://www.w3schools.com/aspnet/webpages_login.aspI did everything like the demo and it was o.k until the register/login pages.when i try to register to the site, i receive this error: Exception Details: System.Data.SqlServerCe.SqlCeException: The column cannot contain null values. [ Column name = UserId,Table name = UserProfile ] Source Error: Line 25: if (user == null)Line 26: {Line 27: db.Execute("INSERT INTO UserProfile (Email) VALUES (@0)", email);Line 28: WebSecurity.CreateAccount(email, password, false);Line 29: Any help will be great ! !
  14. i want to fetch data from multiple tables. they all are similar that is they have same colum names (catalog_product_flat_1,catalog_product_flat_ 2,catalog_product_flat_ 3,catalog_product_flat_ 4.......), but they are not related.Is there any way to do this through stored prcedures or any other way. One more thing these tables will increse in future as the stores of my ecomerce site increases..please help me i am new to this...
  15. I’m new to writing SQL, and most of my needs so far have been met in the wonderful w3 SQL tutorial. However, I have a desire I haven’t been able to find a way to do, and I can't find info on it in the forums either. I have 3 inner joined tables in the part of the code I’m struggling with. ClientsView EmployeeClients Employees For a given client (identified by ClientsView.client_id) there are many employees linked to the client. I want to search those employees and return in a single column “Primary_Staff” the employee assigned to the client who meets certain criteria. In all cases the field EmployeeClients.primary_flag will need to be “YES”. The kicker is that what I want it to look for is first to see if an employee is found where the Employee.profile_code = “MHP”. If so, that is the employee I want listed in the new “Primary_Staff” field. If no one is found with that profile code, then I want it to search the employees to see if any is found where Employee.profile_code = “On Call MHP”. Then Employee.profile_code = “LPE”. And a few others, but that’s enough for the example. If it goes through the list of profile codes I’m looking for and doesn’t find anyone, then I just want it to say “Unassigned.” Thanks in advance for the help, and let me know what other information is needed if you need more info to be able to give me some help.
  16. Hello, regarding to this example in your website: this example display data from mysql database\table with parameter (dropdown list),and i do input the choices to this list,what if i want same this but the choices in the (dropdown list) come from database\table as well ? anyone can help me plz? this example containing two files as the following: 1. HTML File: <html><head><script type="text/javascript">function showUser(str){if (str=="") { document.getElementById("txtHint").innerHTML=""; return; }if (window.XMLHttpRequest) {// code for IE7+, Firefox, Chrome, Opera, Safari xmlhttp=new XMLHttpRequest(); }else {// code for IE6, IE5 xmlhttp=new ActiveXObject("Microsoft.XMLHTTP"); }xmlhttp.onreadystatechange=function() { if (xmlhttp.readyState==4 && xmlhttp.status==200) { document.getElementById("txtHint").innerHTML=xmlhttp.responseText; } }xmlhttp.open("GET","getuser.php?q="+str,true);xmlhttp.send();}</script></head><body><form><select name="users" onchange="showUser(this.value)"><option value="">Select a person:</option><option value="1">Peter Griffin</option><option value="2">Lois Griffin</option><option value="3">Glenn Quagmire</option><option value="4">Joseph Swanson</option></select></form><br /><div id="txtHint"><b>Person info will be listed here.</b></div></body></html> 2. PHP File: <?php$q=$_GET["q"];$con = mysql_connect('localhost', 'peter', 'abc123');if (!$con) { die('Could not connect: ' . mysql_error()); }mysql_select_db("ajax_demo", $con);$sql="SELECT * FROM user WHERE id = '".$q."'";$result = mysql_query($sql);echo "<table border='1'><tr><th>Firstname</th><th>Lastname</th><th>Age</th><th>Hometown</th><th>Job</th></tr>";while($row = mysql_fetch_array($result)) { echo "<tr>"; echo "<td>" . $row['FirstName'] . "</td>"; echo "<td>" . $row['LastName'] . "</td>"; echo "<td>" . $row['Age'] . "</td>"; echo "<td>" . $row['Hometown'] . "</td>"; echo "<td>" . $row['Job'] . "</td>"; echo "</tr>"; }echo "</table>";mysql_close($con);?> Thank you very much... Regards,
  17. can someone please tell me how can i join two table . table1col A colBtable2colC colDHow do i join like this col A colB colC colD
  18. rony_78

    multiply two columns

    I am not programmer just learning, I have a table with ten columns; I want to multiply row by row between two columnsCol2 * col4 = col5 Col6 * col7 = col8 col 5 + col8 = col 9I know how to get this part Col2 * col4 = col5 Col6 * col7 = col8How do I write a query that will add another column with col5 + col8 = col9 SELECT col2, col4, col2 * col4 AS col5, col6, col7, col6 * col7 AS col8FROM Table1 WHERE < criteria> thanks in advance
  19. I am new to vb.net .I would like to know how do i insert text box value into combobox selected table ?i can load tables names in combobox but how do i insert into combobox selected table?Thanks in advance Private Sub Form1_Load(ByVal sender As Object, _ ByVal e As EventArgs) Handles MyBase.Load con.Open() Me.ComboBox1.DisplayMember = "TABLE_NAME" Me.ComboBox1.ValueMember = "TABLE_NAME" Me.ComboBox1.DataSource = Me.con.GetSchema("TABLES", New String() {Nothing, Nothing, Nothing, "TABLE"}) con.Close() End SubPrivate Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click Dim con As New OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\testdb2.accdb") Dim CmdStr As String = "insert into table1 (a,b,c) values ('" & TextBox1.Text & "','" & TextBox2.Text & "','" & TextBox3.Text & "')" con.Open() Dim cmd As OleDbCommand = New OleDbCommand(CmdStr, con) cmd.ExecuteNonQuery() con.Close() MsgBox("Done") End Sub
  20. Greetings, I've used sql to a moderate degree within vba and some third-party software (i.e. ReportWriter) and for the most part I do ok. I currently have a report I am trying to generate with an underlying sql query and I just can't get it to work. I was able to mimic what I needed in MS Access but there are some syntax and formatting that I have not used before. I've looked through the examples but I'm missing something. The report will displays radio assets that have Not been assigned a workorder ticket for a current project that is underway. Particulars:- ProjectID=27 if the asset has/had a workorder created for the project. NULL otherwise.- CategoryID=21, 22 or 24 if the radio asset can be assigned the ProjectID (21=Portable Radio, 22=Mobile Radio, 24=Control Station) * I've created a report that shows all the assets that have been assigned the ProjectID=27 which was easy enough but I have to be able to query a view table that has both Current and History records - with that said, you can possibly have the same AssetID multiple times. What I've tried to do is perform a query that will1. Pull All AssetID's with CategoryID in(21,22,24) from ASSET_V table.2. Left Join the Asset_V table (assetid) with WorkOrderAll_V table (assetid) / Where ProjectID=27 AND with CategoryID in(21,22,24)3. Left Join both (1 & 2) Where WorkOrderAll_V.assetid Is Null. I have two tables with the fields below: Asset_V-----------asset_v.assetidasset_v.serialnumberasset_v.categoryasset_v.agencygroupasset_v.agencynameasset_v.agencyidasset_v.categoryid ServiceCodeIDasset_v.assignedtoasset_v.vehicleidasset_v.aglocationasset_v.descriptionasset_v.modelnumberasset_v.statusid assetStatusIDasset_v.status WorkOrderAll_V--------------------workorderall_v.assetidworkorderall_v.projectidworkorderall_v.statusidworkorderall_v.status woStatusworkorderall_v.wotype SELECT DISTINCTROWasset_v.assetid,asset_v.serialnumber,asset_v.category,asset_v.agencygroup,asset_v.agencyname,asset_v.agencyid,asset_v.categoryid ServiceCodeID,asset_v.assignedto,asset_v.vehicleid,asset_v.aglocation,asset_v.description,asset_v.modelnumber,asset_v.statusid assetStatusID,asset_v.status,r1.projectid,r1.statusid,r1.status woStatus,r1.wotypeFROM (asset_vLEFTJOIN (SELECT DISTINCTROW a1.ASSETID, a1.CATEGORYID ServiceCodeID FROM asset_v as a1) )LEFTJOIN (SELECT r1.assetid, r1.projectid FROM workorderall_v as r1) ON a1.assetid = r1.assetid WHERE (((a1.CATEGORYID) In (21,22,24)) AND ((r1.projectid)=27)) WHERE (((a1.ServiceCodeID) in (21,22,24)) AND ((r1.assetid) IS NULL))
  21. i need to ask where to put this code ?? so that it could run.. CREATE TABLE Profiles( UniqueID AutoIncrement NOT NULL PRIMARY KEY, Username Text (255) NOT NULL, ApplicationName Text (255) NOT NULL, IsAnonymous YesNo, LastActivityDate DateTime, LastUpdatedDate DateTime, CONSTRAINT PKProfiles UNIQUE (Username, ApplicationName))
  22. Hello! So, first off I'm not really a "real" programmer. I handle a lot of tech stuff at the company I'm with though, and I'm pretty good at dabbling. I usually figure out how to do what I need to do when I need to do it, and I rarely can't figure things out! I know plenty of HTML, how to work with CSS style sheets, all kinds of fancy Excel formulas, a bit of XML etc. (Note there are a few tweaks to this post that might not seem to "flow well" with the rest as I've posted it elsewhere first and didn't get much back, but I have figured our a few more things) Sooo, the thing is, I now kind of need to figure out something new, and it's a little more in depth than other things I've tried to do in the past and I'm not sure the best way to go about it. So here's the score. I work for a record label, and we provide metadata for album releases to numerous sites in XML. We've been doing this for years, and the way most XML files display in Grid mode in Stylus has made it so easy to just copy and paste from Excel I've never seen the need to figure out a "proper" or more automated system. In the long haul I probably should have because it would have saved time in the long run, but we really custom tailor our XML to each sites system to optimize it, which requires a human touch anyway. Enter a new site we're delivering directly to. Their XML is very complicated and lethargic. There's a lot of duplicated data in different tags that shouldn't really exist, but are required. It's to the point of ridiculousness really. It'd be waaay too much work to manually enter things. So I started looking for a solution to automate it. I have kind of found a way. Basically I used Stylus to convert a CSV for an album to XML that looks like this <root> <fieldnames> <UPC>UPC</UPC> <catalog>Catalog Number</catalog> <tracknumber>Track Number</tracknumber> <release>Release Date</release> <albumtitle>Title</albumtitle> <artist>Artist</artist> <tracktitle>Track Title</tracktitle> <isrc>ISRC USM2U</isrc> <description>Description</description> <time1>Track Times</time1> <field>Source Master</field> <field>Notes</field> <field>Song Writers</field> </fieldnames> <Row> <UPC>XXXXXXXXX</UPC> <catalog> CD119</catalog> <tracknumber>01</tracknumber> <release>4/10/2003</release> <albumtitle>XXXXXXXXXX</albumtitle> <artist>YYYYYYYYYYYYY</artist> <tracktitle>ZZZZZZZZZZZZ</tracktitle> <isrc>XXXXXXXXXX</isrc> <time1>2:49</time1> <time2>0:02:49</time2> <time3>169</time3> <field>169000</field> </Row> Then that repeats for all tracks Then I found Xquery code { let $doc := . for $v in $doc//root/Row, $a in $doc//root/Row/tracknumber/text() where matches($a, '01') and $v/tracknumber/text() = $a return $v/UPC/text() } Which can pull data from whatever field based off of the track number. This would allow it to pull the track name, track time, etc on a per track basis. So in essence I could setup <File> <FileName>{ let $doc := . for $v in $doc//root/Row, $a in $doc//root/Row/tracknumber/text() where matches($a, '2') and $v/tracknumber/text() = $a return $v/UPC/text() }_01_01_FLAC.flac</FileName> <FilePath>resources</FilePath> <HashSum> <HashSum>CHECKSUM SONG 01</HashSum> <HashSumAlgorithmType>MD5</HashSumAlgorithmType> </HashSum> </File> Etc for each field that would pull the appropriate data in a query that features the actual XML in there as well, so the end result of a full query would be a valid XML document. The downside is that I have to have a manual set of XML code like the above in each spot where I need to fill something. If I created a query with say 30 tracks it would be enough to always auto fill all our albums, because they have less than 30 tracks... Except it would also leave a bunch of XML with empty fields if there were less than 30 tracks. So I'm wondering 2 things. Should I even use Xquery. It really seems like a ghetto way of going about this, especially because of having to manually create a CSV and import that album by album. (Addition, I did try to make one big CSV with the whole database, and then make it filter by using the UPC and the track number, problem is it returns the correct data I'm looking for... Once for every time a track 01 appears in the database! I can't find a way to make it only return it once, and it's maddening! If I could figure that out it might be workable in Xquery) If not, what should I use? We have Access, and MS SQL floating around. It seems like if I could get similar functionality as far as kicking out text out of either of those that alone would advance the cause considerably since they natively handle Excel files. Especially if I could make it automatically recognize when the UPC field changed in a single big long Excel spreadsheet but kick out separate text (XML) documents. As far as if Xquery is a valid way of going about this, can I embed the actual XML code portion in an "if then" sort of situation where it would NOT create data in the final query result if the track number didn't exist in the source XML created from the CSV? Or is there no way to include straight XML inside of code like that? ( Addition It seems like I should be able to use something like this return <video year="{$v/year}"> {$v/title} </video> within the code, which is something I found online. But it seems to always break when I try putting large amounts of XML in there. What are the rules for what can or can't go inside the code space?) If that is possible, I think even the ghetto Xquery way would be workable, otherwise there will be a lot of manual deletion in this big complex XML document that will have to be deleted out. That would still be easier than doing it completely manually, but certainly not optimal. As far as Access or SQL... I've never done anything much in there, but have worked with people who have done all kinds of awesome stuff with them. I know that SQL especially can create all of kinds of text being populated from spreadsheets, and honestly the code has to be so stupidly easy I know I'm going to want to shoot myself when I finally figure it out. It seems to me like there must be some kind of way to make one of them generate the XML tag I need, then pull from a particular field in a spreadsheet that's in the system, and only do it until the data ends or it reaches a new UPC in the spreadsheet. Perhaps create a separate table with all the XML start tags and end tags, so it's actually pulling everything from certain fields in spreadsheets to create the final product? I know this is a bit long winded, so sorry for that. I should have been a Russian novelist And I'm sure this is pretty novice stuff, but I've found programmers are usually quite willing to help in the past. Since this must be pretty simple, I'm hoping I can figure this out and permanently expand my bag of tricks! All I really need is a way to auto pull fields based on perhaps a UPC/track number combo, and have it end when data stops. I could even set this up for all the other sites we deliver to and streamline things even more! Any thoughts or suggestions are welcome, and thank all of you in advance for your help!!!
  23. i checked the main site and it has been a whole heap of help so far. However im not sure how to accomplish a specific task and im now stuck on this. I have the following query: SELECT * FROM chjadb_vehicles WHERE v_make ='$make' AND v_year= '$year' The following statement works fine. However what i want is to add more query criterias such as body type, transmission and thing like that. How do i set something like that. I tried doing it like this: SELECT * FROM chjadb_vehicles WHERE v_make ='$make', v_year= '$year', v_transmission = '$trans' Doesn't work however any help would be appreciated!
  24. <title>Edit_Page</title></head><body><form id="frm2" name="frm2" method="post" action=" "><fieldset><legend align="center">Edit Student Info</legend><table align="center" border="0"><tr> <td>ID:</td> <td><input type="text" id="txtId" name="txtId" /></td></tr><tr> <td>First Name:</td> <td><input type="text" id="txtFname" name="txtFname" /></td></tr><tr> <td>Last Name:</td> <td><input type="text" id="txtLname" name="txtLname" /></td></tr><tr> <td>Address:</td> <td><textarea id="txtAddress" name="txtAddress" cols="30" rows="3"></textarea></td></tr><tr> <td>Pincode:</td> <td><input type="text" id="txtPin" name="txtPin" /></td></tr><tr> <td>Mobile No.:</td> <td><input type="text" id="txtMob" name="txtMob" /></td></tr><tr> <td>Mail ID:</td> <td><input type="text" id="txtMail" name="txtMail" /></td></tr><tr> <td><input type="button" id="btnUpdate" name="btnUpdate" value="Update" onclick="update();" /></td></tr></table></fieldset></form></body><script type="text/javascript">function update(){ var id=document.getElementById('txtId'); alert(id.value); var fname = document.getElementById('txtFname'); alert(fname.value); var lname = document.getElementById('txtLname'); alert(lname.value); var address = document.getElementById('txtAddress'); alert(address.value); var pin = document.getElementById('txtPin'); alert(pin.value); var mob = document.getElementById('txtMob'); alert(mob.value); var mail = document.getElementById('txtMail'); alert(mail.value); var sqlmek="update into Student_info set(ID,s_name,l_name,address,pincode,mobile_no,mail_id)values ("; sqlmek = sqlmek + id.value + ",'" + fname.value + "','" + lname.value + "','"; sqlmek = sqlmek + address.value + "'," + pin.value + "," + mob.value + ",'" + mail.value + "')"; alert(sqlmek); var cn = new ActiveXObject("ADODB.Connection"); alert('Hi!'); var strConn = "Provider=Microsoft.Jet.OLEDB.4.0; Data Source = C:/Aptech/dhruv/SMS.mdb"; alert('Hello!'); var rs = new ActiveXObject("ADODB.Recordset"); alert('How are you!!'); cn.Open(strConn); alert('I am Fine!'); rs.Open(sqlmek, cn); alert('Fine'); alert('Press OK to Update your Records Successfully!!.........');}</script></html> edit.html
  25. Hi.Wonder if you can help, am quite new to SQL. In simple terms, I have a transaction table - and in that table are references to other related tables. In this simple query I am trying to obtain the first name and last name from the user ID for a transaction. SELECT transaction.transactionId, user.firstName, user.lastNameFROM [transaction]INNER JOIN [user]ON transaction.userId = user.userIdORDER BY user.userId However I get the response "incorrect syntax near the keyword transaction". I then try: SELECT 'transaction'.transactionId, user.firstName, user.lastNameFROM [transaction]INNER JOIN [user]ON 'transaction'.userId = user.userIdORDER BY user.userId I then receive "cannot call methods on varchar" - which I am assuming SQL thinks I am referring to text - rather than table names. I then tried: SELECT dbo.transaction.transactionId, user.firstName, user.lastNameFROM [transaction]INNER JOIN [user]ON dbo.transaction.userId = user.userIdORDER BY user.userId However no joy - I get the initial error message. Is someone able to point me in the right direction as to where I am going wrong? I have quite a few joins I need to do - but I thought if I could get this fixed first that would be a start.Cheers. Kev
×
×
  • Create New...