Jump to content

Search the Community

Showing results for tags 'query'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • Welcome to PHP Freaks
    • Announcements
    • Introductions
  • PHP Coding
    • PHP Coding Help
    • Regex Help
    • Third Party Scripts
    • FAQ/Code Snippet Repository
  • SQL / Database
    • MySQL Help
    • PostgreSQL
    • Microsoft SQL - MSSQL
    • Other RDBMS and SQL dialects
  • Client Side
    • HTML Help
    • CSS Help
    • Javascript Help
    • Other
  • Applications and Frameworks
    • Applications
    • Frameworks
    • Other Libraries
  • Web Server Administration
    • PHP Installation and Configuration
    • Linux
    • Apache HTTP Server
    • Microsoft IIS
    • Other Web Server Software
  • Other
    • Application Design
    • Other Programming Languages
    • Editor Help (PhpStorm, VS Code, etc)
    • Website Critique
    • Beta Test Your Stuff!
  • Freelance, Contracts, Employment, etc.
    • Services Offered
    • Job Offerings
  • General Discussion
    • PHPFreaks.com Website Feedback
    • Miscellaneous

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


Age


Donation Link

  1. hey guys, i have a MySQL query that has multiple LIKE wildcard statement and multiple ORDER BY statements. "SELECT * FROM `content` WHERE `release_date` LIKE '%2013-06%' OR `release_date` LIKE '%2013-05%' OR `release_date` LIKE '%2013-04%' AND `release_country` = 'USA' AND `is_active_member` = 1 ORDER BY `votes' DESC, `release_date` DESC LIMIT 0 , 50" as you can see i have 3 wildcard's 5 total conditionals 2 ORDER BY fields The ISSUE: my wildcard statements work just fine and filters what i need, everything after ( release_country, is_active_member) dont seem to filter, also my ORDER BY only passes the first conditional. and release_date is not sorted. i have done plenty of research to see if there are other formats to this( which there is ) but they also don't seem to work. The data and field names are correct, and when i place the other fields first, they come out correctly. but i cant get this exact query to work. any suggestions as why this is happening ? thanks guys
  2. Hi guys. Im almost dead trying to do this..somebody help me please How do i can get this: First Name | Last Name | Age | Registered ---------------------------------------------------- John | Harris | 30 | Yes Amy | Ford | 45 | No Of this tables.. Table Fields: ID | Label ---------------- 1 | First Name 2 | Last name 3 | Age Table Users: FieldID | UserID | Value ------------------------- 1 | 1 | John 2 | 1 | Harris 3 | 1 | 30 1 | 2 | Amy 2 | 2 | Ford 3 | 2 | 45 Table Registrations: UserID | Registered ------------------- 1 | Yes 2 | No Thanks in advance to all.
  3. OK time for a very tricky mysql query (well, tricky for me anyway)… I have two tables: ‘patients’ and ‘obs’ Variables in patients: MRN, name, others1 Variables in obs: MRN, par (numeric value), time_recorded (datetime value), others2 Each time a new par value is added to obs: MRN, datetime, others 2 are recorded also (there are no null values). Multiple par values are therefore added over time for the same MRN number (as different rows in the table) I want to make a query that will select * from patients and * from obs using inner join using MRN only when the most recent par value for each unique MRN in obs was >6 For some context: MRNs are hospital numbers of patients and par is a score of how unwell they are. I am trying to produce a list of all the patients who’s most recent par value recorded in obs is >6 and print their details. I think I have managed to work out the inner join part: SELECT * from obs INNER JOIN patients ON obs.MRN = patient.MRN. What I just can’t figure out however is how to select only records where the most recent par for that particular MRN (ie patient) was > 6. I suppose one way to do this is to select all data from both tables using inner join MRN where obs.par >6, and then sort by mrn, the sort by datetime decending, and then only print the top returned result for each unique mrn, but im not really sure if that last part is possible? I hope all that makes sense? Any guidance or ideas anyone has about how to achieve this would be very helpful. Thanks all in advance for any replies, Matt
  4. if (is_array($_POST['uid'])) { foreach($_POST['hours']AS $keyd => $value) { echo "UPDATE participantlog SET noshow=1 AND hours=" . $value . " WHERE cid=" . $cid . " AND uid=" . $keyd . "<br>"; mysql_query("UPDATE participantlog SET noshow='1' AND hours='$value' WHERE cid='$cid' AND uid='$keyd'") or die(mysql_error()); } } For some reason my query isn't executing. The foreach is working properly and producing all the right variables (as verified by the echo). But it just isn't updating the DB. Why might this be? Thanks! Clinton
  5. Hello, I have a table called profiles. I have 3 colums, id,property,value The property has the items name,rating,birthday and the column value holds the value of each property. Now i want to order my results by the property rating and value Desc. I'm stuck here how i can do this ? Can anyone helps me with that ?
  6. Hi Guys and Girls! I've got a search query that i'm trying to execute via a PHP script. When I run the statements in PHPMyAdmin, I get perfect results. When I run it in the PHP script, it's just giving me a 500 error and won't process the query. Here's the code: <?php /* Make connections to other scripts that have code in them */ include('format.php'); // includes formatting for results include('config.php'); // include your code to connect to DB. $tbl_name="animal_info"; //name of the table within the MySQL Database that we're going to search // How many adjacent pages should be shown on each side? $adjacents = 3; //Let's not forget the register globals off crap $animalID = $_GET['animalID']; $status = $_GET['status']; $date = $_GET['date']; $species = $_GET['species']; $breed = $_GET['breed']; $sex = $_GET['sex']; $primary_colour = $_GET['primary_colour']; $colour = $_GET['colour']; $distinctive_traits = $_GET['distinctive_traits']; $fur_length = $_GET['fur_length']; $age = $_GET['age']; $desexed = $_GET['desexed']; $microchipped = $_GET['microchipped']; $suburb = $_GET['suburb']; $pound_area = $_GET['pound_area']; $contact = $_GET['contact']; $link = $_GET['link']; $columns = $_GET['columns']; $find = $_GET['find']; $searching = $_GET['searching']; // We perform a bit of filtering $find = strtoupper($find); $find = strip_tags($find); $find = trim ($find); /* Here we're going to get the total number of rows in the database to calculate how many pages of data there are depending on the search terms */ $query = "SELECT COUNT(*) as num FROM animal_info WHERE MATCH(animalID, status, date, species, breed, sex, primary_colour, colour, distinctive_traits, fur_length, age, desexed, microchipped, suburb, pound_area, contact, link, notes) AGAINST('%find%' IN BOOLEAN MODE);" $total_pages = mysql_fetch_array(mysql_query($query)); $total_pages = $total_pages[num]; /* Setup vars for query. */ $targetpage = "process_search.php"; //your file name (the name of this file) $limit = 1; //how many items to show per page $page = $_GET['page']; if($page) $start = ($page - 1) * $limit; //first item to display on this page else $start = 0; //if no page var is given, set start to 0 /* Get data. */ $sql = "SELECT * from animal_info where MATCH(animalID, status, date, species, breed, sex, primary_colour, colour, distinctive_traits, fur_length, age, desexed, microchipped, suburb, pound_area, contact, link, notes) AGAINST('%find%' IN BOOLEAN MODE);" $result = mysql_query($sql); /* Setup page vars for display. */ if ($page == 0) $page = 1; //if no page var is given, default to 1. $prev = $page - 1; //previous page is page - 1 $next = $page + 1; //next page is page + 1 $lastpage = ceil($total_pages/$limit); //lastpage is = total pages / items per page, rounded up. $lpm1 = $lastpage - 1; //last page minus 1 /* Now we apply our rules and draw the pagination object. We're actually saving the code to a variable in case we want to draw it more than once. */ $pagination = ""; if($lastpage > 1) { $pagination .= "<div class=\"pagination\">"; //previous button if ($page > 1) $pagination.= "<a href=\"$targetpage?page=$prev\">? previous</a>"; else $pagination.= "<span class=\"disabled\">? previous</span>"; //pages if ($lastpage < 7 + ($adjacents * 2)) //not enough pages to bother breaking it up { for ($counter = 1; $counter <= $lastpage; $counter++) { if ($counter == $page) $pagination.= "<span class=\"current\">$counter</span>"; else $pagination.= "<a href=\"$targetpage?page=$counter\">$counter</a>"; } } elseif($lastpage > 5 + ($adjacents * 2)) //enough pages to hide some { //close to beginning; only hide later pages if($page < 1 + ($adjacents * 2)) { for ($counter = 1; $counter < 4 + ($adjacents * 2); $counter++) { if ($counter == $page) $pagination.= "<span class=\"current\">$counter</span>"; else $pagination.= "<a href=\"$targetpage?page=$counter\">$counter</a>"; } $pagination.= "..."; $pagination.= "<a href=\"$targetpage?page=$lpm1\">$lpm1</a>"; $pagination.= "<a href=\"$targetpage?page=$lastpage\">$lastpage</a>"; } //in middle; hide some front and some back elseif($lastpage - ($adjacents * 2) > $page && $page > ($adjacents * 2)) { $pagination.= "<a href=\"$targetpage?page=1\">1</a>"; $pagination.= "<a href=\"$targetpage?page=2\">2</a>"; $pagination.= "..."; for ($counter = $page - $adjacents; $counter <= $page + $adjacents; $counter++) { if ($counter == $page) $pagination.= "<span class=\"current\">$counter</span>"; else $pagination.= "<a href=\"$targetpage?page=$counter\">$counter</a>"; } $pagination.= "..."; $pagination.= "<a href=\"$targetpage?page=$lpm1\">$lpm1</a>"; $pagination.= "<a href=\"$targetpage?page=$lastpage\">$lastpage</a>"; } //close to end; only hide early pages else { $pagination.= "<a href=\"$targetpage?page=1\">1</a>"; $pagination.= "<a href=\"$targetpage?page=2\">2</a>"; $pagination.= "..."; for ($counter = $lastpage - (2 + ($adjacents * 2)); $counter <= $lastpage; $counter++) { if ($counter == $page) $pagination.= "<span class=\"current\">$counter</span>"; else $pagination.= "<a href=\"$targetpage?page=$counter\">$counter</a>"; } } } //next button if ($page < $counter - 1) $pagination.= "<a href=\"$targetpage?page=$next\">next ?</a>"; else $pagination.= "<span class=\"disabled\">next ?</span>"; $pagination.= "</div>\n"; } ?> <?php while($row = mysql_fetch_array($result)) { //Build the HTML for the results in the table echo "$resultsHTMLabove"; echo "<br><BR>"; //Here's the table echo "<table width=\"100%\" border=\"0\" cellspacing=\"5\" cellpadding=\"2\">"; echo "<tr>"; echo "<th scope=\"row\" align=\"left\">Animal ID</th>"; echo "<td>".$row['animalID']."</td>"; echo "</tr>"; echo "<tr>"; echo "<th scope=\"row\" align=\"left\">Status</th>"; echo "<td>".$row['status']."</td>"; echo "</tr>"; echo "<tr>"; echo "<th scope=\"row\" align=\"left\">Date</th>"; echo "<td>".$row['date']."</td>"; echo "</tr>"; echo "<tr>"; echo "<th scope=\"row\" align=\"left\">Species</th>"; echo "<td>".$row['species']."</td>"; echo "</tr>"; echo "<tr>"; echo "<th scope=\"row\" align=\"left\">Breed</th>"; echo "<td>".$row['breed']."</td>"; echo "</tr>"; echo "<tr>"; echo "<th scope=\"row\" align=\"left\">Sex</th>"; echo "<td>".$row['sex']."</td>"; echo "</tr>"; echo "<tr>"; echo "<th scope=\"row\" align=\"left\">Primary Colour</th>"; echo "<td>".$row['primary_colour']."</td>"; echo "</tr>"; echo "<tr>"; echo "<th scope=\"row\" align=\"left\">Colour</th>"; echo "<td>".$row['colour']."</td>"; echo "</tr>"; echo "<tr>"; echo "<th scope=\"row\" align=\"left\">Distinctive Traits</th>"; echo "<td>".$row['distinctive_traits']."</td>"; echo "</tr>"; echo "<tr>"; echo "<th scope=\"row\" align=\"left\">Fur Length</th>"; echo "<td>".$row['fur_length']."</td>"; echo "</tr>"; echo "<tr>"; echo "<th scope=\"row\" align=\"left\">Age</th>"; echo "<td>".$row['age']."</td>"; echo "</tr>"; echo "<tr>"; echo "<th scope=\"row\" align=\"left\">Desexed?</th>"; echo "<td>".$row['desexed']."</td>"; echo "</tr>"; echo "<tr>"; echo "<th scope=\"row\" align=\"left\">Microchipped?</th>"; echo "<td>".$row['microchipped']."</td>"; echo "</tr>"; echo "<tr>"; echo "<th scope=\"row\" align=\"left\">Suburb</th>"; echo "<td>".$row['suburb']."</td>"; echo "</tr>"; echo "<tr>"; echo "<th scope=\"row\" align=\"left\">Pound Area</th>"; echo "<td>".$row['pound_area']."</td>"; echo "</tr>"; echo "<tr>"; echo "<th scope=\"row\" align=\"left\">Contact</th>"; echo "<td>".$row['contact']."</td>"; echo "</tr>"; echo "<tr>"; echo "<th scope=\"row\" align=\"left\">Link</th>"; echo "<td><a href='".$row['link']."' target=_blank >Link to Facebook</a></td>"; echo "</tr>"; echo "<tr>"; echo "<th scope=\"row\" align=\"left\">Notes</th>"; echo "<td>".$row['notes']."</td>"; echo "</tr>"; echo "<tr>"; echo "<th scope=\"row\" align=\"left\">Photo</th>"; echo "<td>"; echo "<img src=\"getimage.php?id=".$row['ID']."\" width=\"200px\" height=\"150px\" />"; echo "</td>"; echo "</tr>"; echo "</table>"; echo "<BR><BR>"; //And we remind them what they searched for echo "<b>You searched for:</b>".$find; echo "</div>"; //Build the footer part of the page echo "$resultsHTMLbelow"; } //If there wasn't any results, we say thanks for searching, but we couldn't find anything that was worth showing and ask them to try again if ($counter == 0) { //Once again, build the HTML output of the page for the "No Search Results" page echo "$noResultsSearch"; } ?> <?=$pagination?> If anyone can see anything obvious, I would love to hear from you! Thanks in advance! Cheers, Dave
  7. I'm trying to create a random image script that selects from an existing list of different users images within a database but i'm having no luck. Anyone knows of a way to do it? Here's the code... 'rnprofile.php' if (isset($_FILES["image"]["name"])) { $TempFile = $_FILES["image"]["tmp_name"]; $FolderName = 'images/'; // Setting the upload directory $CurrentTime = time(); // Time of upload (UNIX) $Filename = $user."_".$CurrentTime.".jpg"; // Filename of the file $saveto = $FolderName.$Filename; // Will look something like"images/alex_1365249148.jpg" //First debug //echo "DEBUG ECHO:<br/>We're uploading the file named: ".$Filename."<br/>And we're putting it into: ".$saveto."<br/>END DEBUG ECHO"; //exit(); move_uploaded_file($_FILES["image"]["tmp_name"], $saveto); $typeok = TRUE; switch($_FILES["image"]["type"]) { case "image/gif": $src = imagecreatefromgif($saveto); break; case "image/jpeg": // Both regular and progressive jpegs case "image/pjpeg": $src = imagecreatefromjpeg($saveto); break; case "image/png": $src = imagecreatefrompng($saveto); break; default: $typeok = FALSE; break; } if ($typeok) { list($w, $h) = getimagesize($saveto); $max = 600; $tw = $w; $th = $h; if ($w > $h && $max < $w) { $th = $max / $w * $h; $tw = $max; } elseif ($h > $w && $max < $h) { $tw = $max / $h * $w; $th = $max; } elseif ($max < $w) { $tw = $th = $max; } $tmp = imagecreatetruecolor($tw, $th); imagecopyresampled($tmp, $src, 0, 0, 0, 0, $tw, $th, $w, $h); imageconvolution($tmp, array( // Sharpen image array(-1, -1, -1), array(-1, 16, -1), array(-1, -1, -1) ), 8, 0); imagejpeg($tmp, $saveto); log_image_upload($UserData['user_id'], $Filename, $saveto, $CurrentTime); // Logging the image upload into MySQL imagedestroy($tmp); imagedestroy($src); } } echo <<<_END <form method='post' action='rnprofile.php' enctype='multipart/form-data'> </br> <h3>Upload your designs here:</h3><br /> Image: <input type='file' name='image' size='14' maxlength='32' /> <input type='submit' value='Upload design' /> </pre></form> _END; 'rnfunctions.php'... function log_image_upload($UserID, $Filename, $Location, $Time) { //add in sanitization code in here for all variables being parsed. mysql_query("INSERT INTO `images` (`user_id`, `location`, `filename`, `time`) VALUES ('$UserID', '$Location', '$Filename', '$Time')"); } function showProfile($user) { //$UserID = mysql_result(mysql_query("SELECT `user_id` FROM `rnprofiles` WHERE `user` = '$user'"), 0) or die(mysql_error()); $result=mysql_query("SELECT `user_id` FROM `rnprofiles` WHERE `user` = '$user'") or die(mysql_error()); if(mysql_num_rows($result) or die(mysql_error())) { while($row = mysql_fetch_assoc($result)) { $UserID = $row['user_id']; } } else { echo "no rows found"; } $Query = mysql_query("SELECT * FROM `images` WHERE `user_id` = '$UserID'") or die(mysql_error()); while ($ImageData = mysql_fetch_assoc($Query)) { echo '<p><a title="'.$user.'" class="fancybox" data-fancybox-group="gallery" href="'.$ImageData['location'].'"><img src="'.$ImageData['location'].'" border="1px" align="left" height="150" alt=""/></a></p>';// Display each image belonging to the user } $result = mysql_query("SELECT * FROM rnprofiles WHERE user='$user'") or die(mysql_error()); if (mysql_num_rows($result)) { $row = mysql_fetch_row($result); echo stripslashes($row[8]) . "<a><br clear=left /><br /></a>"; } } Thanks a lot in advance!
  8. Hy I'm trying to execute this query $stmt = $mysqli->prepare("SELECT streamer,content,provider FROM evento,canali WHERE canali.id=evento.idcanale AND evento.titolo LIKE '%?%' OR evento.sottotitolo LIKE '%?%' AND evento.datainizio=2013-02-21;"); $stmt->bind_param('ss',$tok,$tok); $stmt->execute(); $stmt->close(); but I get this error Warning: mysqli_stmt::bind_param(): Number of variables doesn't match number of parameters in prepared statement. but to me it seems like the number are the same, you can see how I prepared the statement with 2 arguments to define, and then I passe 2 arguments to add_param, what I'm getting wrong? some has some ideas? thanks daniele New php-forum User Posts: 2 Joined: Fri May 03, 2013 6:48 pm
  9. Hi all, I wish I could use the mysqli/ PDO to accomplish what I am trying to do right away. I do not know either how I can intergrate the "=" criteria with the "LIKE" in the following piece of code. The code is for searching with multiple criterion. The search with this cat_id is okey expect that I want its criteria not to be part of the "LIKE" criteria; instead it should be "=" so that I can get the exact match in the search, since cat_id is saved as a foreign key in the child table. May be some form of switch but how? $criteria = array('ctitle', 'csubject', 'creference', 'cat_id', 'cmaterial', 'ctechnic', 'cartist', 'csource', 'stolen'); $likes = ""; $url_criteria = ''; foreach ( $criteria AS $criterion ) { if ( ! empty($_POST[$criterion]) ) { $value = ($_POST[$criterion]); $likes .= " AND `$criterion` LIKE '%$value%'"; $url_criteria .= '&'.$criterion.'='.htmlentities($_POST[$criterion]); } elseif ( ! empty($_GET[$criterion]) ) { $value = mysql_real_escape_string($_GET[$criterion]); $likes .= " AND `$criterion` LIKE '%$value%'"; $url_criteria .= '&'.$criterion.'='.htmlentities($_GET[$criterion]); } //var_dump($likes); } $sql = "SELECT * FROM collections WHERE c_id>0" . $likes . " ORDER BY c_id ASC"; Your help will be appreciated.
  10. Hello all, this is my first post on phpfreaks. I'm trying to figure out what the better way to write this is. I think that the way I have it is very slow and not the best way to. Any idea? function tot_time_worked_by_week(){ global $db; $username = $_SESSION['username']; $sundayTime = $mondayTime = $tuesdayTime = $wednesdayTime = $thursdayTime = $fridayTime = $saturdayTime = 0; $query = "SELECT user_id, time_zone FROM users WHERE user_name = '{$username}' "; $resSet = $db->query($query,'assoc'); $user_id = $resSet[0]['user_id']; $user_timezone = $resSet[0]['time_zone']; $time = 0; $query = "SELECT project_id FROM project WHERE user_id = '{$user_id}'"; $res = $db->query($query,'assoc'); if(!empty($res)): foreach($res as $project): $query = "SELECT track_id FROM project_track WHERE project_id = ".$db->prep($project['project_id']); $resT = $db->query($query,'assoc'); if($resT != false){ foreach($resT as $row): $query = "SELECT time_start, time_end FROM track_time WHERE track_id = ".$db->prep($row['track_id'])." AND YEARWEEK(FROM_UNIXTIME(time_start)) = YEARWEEK(CURRENT_DATE) AND DAYOFWEEK(FROM_UNIXTIME(time_start)) = 1"; $sunday = $db->query($query,'assoc'); if(empty($sunday[0]['time_start'])){ $sundayTime += 0; }else{ $sundayTime += calculate_time_past($sunday[0]['time_start'],$sunday[0]['time_end'],'U'); } $query = "SELECT time_start, time_end FROM track_time WHERE track_id = ".$db->prep($row['track_id'])." AND YEARWEEK(FROM_UNIXTIME(time_start)) = YEARWEEK(CURRENT_DATE) AND DAYOFWEEK(FROM_UNIXTIME(time_start)) = 2"; $monday = $db->query($query,'assoc'); if(empty($monday[0]['time_start'])){ $mondayTime += 0; }else{ $mondayTime += calculate_time_past($monday[0]['time_start'],$monday[0]['time_end'],'U'); } $query = "SELECT time_start, time_end FROM track_time WHERE track_id = ".$db->prep($row['track_id'])." AND YEARWEEK(FROM_UNIXTIME(time_start)) = YEARWEEK(CURRENT_DATE) AND DAYOFWEEK(FROM_UNIXTIME(time_start)) = 3"; $tuesday = $db->query($query,'assoc'); if(empty($tuesday[0]['time_start'])){ $tuesdayTime += 0; }else{ $tuesdayTime += calculate_time_past($tuesday[0]['time_start'],$tuesday[0]['time_end'],'U'); } $query = "SELECT time_start, time_end FROM track_time WHERE track_id = ".$db->prep($row['track_id'])." AND YEARWEEK(FROM_UNIXTIME(time_start)) = YEARWEEK(CURRENT_DATE) AND DAYOFWEEK(FROM_UNIXTIME(time_start)) = 4"; $wednesday = $db->query($query,'assoc'); if(empty($wednesday[0]['time_start'])){ $wednesdayTime += 0; }else{ $wednesdayTime += calculate_time_past($wednesday[0]['time_start'],$wednesday[0]['time_end'],'U'); } $query = "SELECT time_start, time_end FROM track_time WHERE track_id = ".$db->prep($row['track_id'])." AND YEARWEEK(FROM_UNIXTIME(time_start)) = YEARWEEK(CURRENT_DATE) AND DAYOFWEEK(FROM_UNIXTIME(time_start)) = 5"; $thursday = $db->query($query,'assoc'); if(empty($thursday[0]['time_start'])){ $thursdayTime += 0; }else{ $thursdayTime += calculate_time_past($thursday[0]['time_start'],$thursday[0]['time_end'],'U'); } $query = "SELECT time_start, time_end FROM track_time WHERE track_id = ".$db->prep($row['track_id'])." AND YEARWEEK(FROM_UNIXTIME(time_start)) = YEARWEEK(CURRENT_DATE) AND DAYOFWEEK(FROM_UNIXTIME(time_start)) = 6"; $friday = $db->query($query,'assoc'); if(empty($friday[0]['time_start'])){ $fridayTime += 0; }else{ $fridayTime += calculate_time_past($friday[0]['time_start'],$friday[0]['time_end'],'U'); } $query = "SELECT time_start, time_end FROM track_time WHERE track_id = ".$db->prep($row['track_id'])." AND YEARWEEK(FROM_UNIXTIME(time_start)) = YEARWEEK(CURRENT_DATE) AND DAYOFWEEK(FROM_UNIXTIME(time_start)) = 7"; $saturday = $db->query($query,'assoc'); if(empty($saturday[0]['time_start'])){ $saturdayTime += 0; }else{ $saturdayTime += calculate_time_past($saturday[0]['time_start'],$saturday[0]['time_end'],'U'); } endforeach; } endforeach; endif; echo $sundayTime; echo $mondayTime; echo $tuesdayTime; echo $wednesdayTime; echo $thursdayTime; echo $fridayTime; echo $saturdayTime; }
  11. I have been struggling with this piece of code all morning and can't figure out why it won't output the result of the SQL $sql = "SELECT MAX(PartID) FROM `fullstocklist`"; $result=mysql_query($sql); if(!$result){echo "<p>SQL Error</p>";exit;} $row = mysql_fetch_row($result) or die(mysql_error()); echo "Maximum value is : ".$row['PartID']; $checktop = $row['PartID']; The query works, and returns the correct result in terminal, but I don't get an output after echo "Maximum value is :". The error must be in my php somewhere. Can anyone else spot it? It's really frustrating me
  12. Hi, I want the query initially to return all records where c_id>0 and then filter based on the subsequent criteria supplied through text boxes. However, I am not getting any records printed the first time the page is accessed. When I echo the query I get the following printed instead: SELECT * FROM collections WHERE ( c_id>0 AND `ctitle` = '' AND `csubject` = '' AND `creference` = '' AND `cobjecttype` = '' AND `cmaterial` = '' AND `ctechnic` = '' AND `csource` = '' AND `cartist` = '' )ORDER BY c_id DESCrequest "Could not execute SQL query" SELECT * FROM collections WHERE ( c_id>0 AND `ctitle` = '' AND `csubject` = '' AND `creference` = '' AND `cobjecttype` = '' AND `cmaterial` = '' AND `ctechnic` = '' AND `csource` = '' AND `cartist` = '' )ORDER BY c_id DESC And the code is as follows: $ctitle = mysql_real_escape_string($_POST['ctitle']); $csubject = mysql_real_escape_string($_POST['csubject']); $creference = mysql_real_escape_string($_POST['creference']); $cobjecttype = mysql_real_escape_string($_POST['cobjecttype']); $cmaterial = mysql_real_escape_string($_POST['cmaterial']); $ctechnic = mysql_real_escape_string($_POST['ctechnic']); $cartist = mysql_real_escape_string($_POST['cartist']); $csource = mysql_real_escape_string($_POST['csource']); $sql = "SELECT * FROM collections WHERE ( c_id>0 AND `ctitle` = '{$ctitle}' AND `csubject` = '{$csubject}' AND `creference` = '{$creference}' AND `cobjecttype` = '{$cobjecttype}' AND `cmaterial` = '{$cmaterial}' AND `ctechnic` = '{$ctechnic}' AND `csource` = '{$csource}' AND `cartist` = '{$cartist}' )ORDER BY c_id DESC"; Where have I gone wrong here? Joseph
  13. Hello, I have been trying to figure out how to write a certain php query and for the life of me I can not figure it out. I've tried searching on google like a mad man and still can not figure it out. Maybe Im missing something, Im not sure. I came across this site while googlin for answers. The php code is for a wordpress site I am working on. Here is my current code - <?php $custom_terms = get_terms('videoscategory'); $other_custom_terms = get_terms('product_category'); foreach(array($custom_terms as $custom_term) { wp_reset_query(); $args = array('post_type' => 'product', 'tax_query' => array( 'relation' => 'AND', array( 'taxonomy' => 'videoscategory', 'field' => 'slug', 'terms' => $custom_term->slug ), array( 'taxonomy' => 'product_category', 'field' => 'slug', 'terms' => $other_custom_term->slug ), ) ); $loop = new WP_Query($args); if($loop->have_posts()) { echo '<h1 style="margin-top:10px;">'.$custom_term->name.'</h1>'; while($loop->have_posts()) : $loop->the_post(); echo '<h2><a href="'.get_permalink().'">'.get_the_title().'</a></h2>'; endwhile; } } ?> Im trying to list all the posts that are in both of my custom taxonomies, however when I try using the code nothing shows but when I use 1 taxonomy at a time, with one array, it works perfectly. Someone on gave me some advice but I do not understand it - generate array of your second taxonomy terms and feed it into the query - What exactly is that advice telling me to do? Any help is appreciated. Thanks.
  14. Hello, I'm trying to display the results of my query in a text box so that they can be edited, if need be, and updated in the database. I'm getting the error below, with the code below. I've tried a couple of different ways to format the "value" of the text box as you can see by the second one that's commented out and still a no go. Thanks for any help in advance guys. The error below is referring to the code just below here. echo "<td><input type="text" name="firstname" value="$firstname"></td>"; Parse error: syntax error, unexpected T_STRING, expecting ',' or ';' in C:\ $rs=odbc_exec($conn,$sql); if (!$rs) {exit("Error in SQL");} echo "<table><tr>"; echo "<th>First Name</th>"; echo "<th>Middle Initial</th>"; echo "<th>Last Name</th>"; echo "<th>Full Name</th>"; echo "<th>Provider ID</th></tr>"; while (odbc_fetch_row($rs)) { $firstname=odbc_result($rs,"provider_first_name"); $middleinitial=odbc_result($rs,"provider_middle_name"); $lastname=odbc_result($rs,"provider_last_name"); $fullname=odbc_result($rs,"provider_full_name"); $provider_id=odbc_result($rs,"provider_id"); echo "<tr><td>$firstname</td>"; echo "<td><input type="text" name="firstname" value="$firstname"></td>"; echo "<td>$middleinitial</td>"; echo "<td>$lastname</td>"; echo "<td>$fullname</td>"; echo "<td>$provider_id</td>"; // echo "<td><input type="text" name="textfield" value='".$providerid."'"></td>"; echo "<td>$providerid</td></tr>"; } odbc_close($conn);
  15. Hi, I am trying to write a query, but it is not giving the correct results. I have 2 mysql tables: roomsbooked = records the date (date datatype) and userID of who has a room booked rooms = a list of all rooms What I need to do is look at the roomsbooked table for a given date and create an array of any rooms from the rooms table that are not included for that date in roomsbooked. Essentially, I am trying to find out what rooms are still available. I have written a query, but it is not giving me the correct data: $sql3 = mysql_query("SELECT * FROM rooms, roomsbooked WHERE roomsbooked.event_date = '$currentDate' && rooms.roomID != roomsbooked.roomID"); $numrows3 = mysql_num_rows($sql3); echo $numrows3; while($row3 = mysql_fetch_array($sql3)) { $rooms[] = $row3['rooms.roomnum']; } print_r($rooms); The problem is that when I echo numrows3 I get zero. I know that there is a record in the roomsbooked table for the event_date I am querying and I have lots of room in the rooms table. Please can someone kindly point me in the right direction. Many Thanks, John
  16. I am working through a Create a CMS tutorial and I am on the very last step, but I am hung up. My code is below. It is supposed to pull up a blank form when you want to add a new blog post and it is supposed to populate the field when you want to edit a previous blog post. That all works fine. The edit a blog post functionality works as it should. My problem is when I submit a new blog post, the data does not get sent to the database. Any ideas where I may have gone wrong? Aaron <?php ## Blog Manager?> <?php if (isset($_POST['submitted']) == 1) { if ($_GET['id'] == '') { $q = "INSERT INTO blog (title, date, body) VALUES ('$_POST[title]', '$_POST[date]', '$_POST[body]'"; }else { $q = "UPDATE blog SET title = '$_POST[title]', date = '$_POST[date]', body = '$_POST[body]' WHERE id = '$_POST[id]'"; } $r = mysqli_query($dbc, $q); } ?> <h2>ATOM.CMS Blog Manager</h2> <div class="col sidebar"> <ul class="nav_side"> <li><a href="?page=blog">+ Add Post</a></li> <?php $q = "SELECT * FROM blog ORDER BY date ASC"; $r = mysqli_query($dbc, $q); if ($r) { while ($link = mysqli_fetch_assoc($r)) { echo '<li><a href="?page=blog&id='.$link['id'].'">'.$link['title'].'</a></li>'; } } ?> </ul> </div> <div class="col editor"> <h1> <?php if (isset($_GET['id'])) { $q = "SELECT * FROM blog WHERE id = '$_GET[id]' LIMIT 1"; $r = mysqli_query($dbc, $q); $opened = mysqli_fetch_assoc($r); echo 'Editing: '.$opened['title']; } else { echo 'Add a New Blog Post'; } ?> </h1> <form action="?page=blog&id=<?php if (isset($_GET['id'])){echo $opened['id'];} ?>" method="post"> <table class="gen_form"> <tr> <td class="gen_label"><label>Blog title: </label></td> <td><input class="gen_input" type="text" size="30" name="title" value="<?php if (isset($_GET['id'])){echo $opened['title'];} ?>" /></td> </tr> <tr> <td class="gen_label"><label>Blog date: </label></td> <td><input class="gen_input" type="text" size="30" name="date" value="<?php if (isset($_GET['id'])){echo $opened['date'];} ?>"/></td> </tr> <tr> <td class="gen_label"></td> </tr> <tr> <td colspan="2" class="gen_label"><label>Blog body: </label></td> </tr> <tr> <td colspan="2"><textarea id="page_body" name="body" cols="90" rows="24"><?php if (isset($_GET['id'])){echo $opened['body'];} ?></textarea></td> </tr> <tr> <td colspan="2"><input class="gen_submit" type="submit" name="submit" value="Save Changes" /></td> </tr> <input type="hidden" name="submitted" value="1" /> <input type="hidden" name="id" value="<?php if (isset($_GET['id'])){echo $opened['id'];} ?>" /> </table> </form> </div>
  17. I want to compare two columns, essentially this: $query = "SELECT * FROM table WHERE column3 < column4;"; Is this even possible? Or have I just got the syntax badly wrong? I've tried writing out a complicated php code breaking my task into three MySQL lookups instead but that's proving more trouble than its worth.. Everything I've found on Google hasn't been related to my problem... Is anyone able to help me in the right direction? Thanks
  18. i have created a registration form page with id,name,col,branch,etc Coming to the database ID is primary and auto increment, im trying to print the generated value of from the database after the registration is done. For example: "You have Successfully registered with us n your id is xxxxxx" Please someone helpme out with this
  19. I apologize in advance for my utter noobness. I've been learning php in bits and pieces. My database structure: 3 fields only, the relevant ones being "artist" and "title" I made a search page (POETS Karaoke songs) that searches correctly, but only if the user inputs partial or complete words in the correct order, and the words only appear in one of the two fields. I wanted to make it possible to find artist/title combination when multiple or partial words are input in any order. I did something wrong, in that my new coding returns the database regardless of the search terms. This broken page is here. <form name="search" method="post" action="<?=$PHP_SELF?>"> <span> <input type="text" name="find" /> <input type="hidden" name="searching" value="yes" /> <input type="submit" name="search" value="Search" /> </span> </form> <? //This is only displayed if they have submitted the form if ($searching =="yes") { echo "<br><b>You searched for: " .$find; echo "<hr>"; //If they did not enter a search term we give them an error if ($find == "") { echo "<p>No search term entered. Please go back to the previous page and try again."; exit; } // Begin Search $searchQuery = ''; // search query is empty by default $searchCondition = "(artist LIKE '%%' OR title LIKE '%%')"; $searchFieldName = 'artist'; // name of the field to be searched $searchFieldName2 = 'title'; if(isset($find['text'])) { // check if a query was submitted $searchQuery = trim($find['text']); // getting rid of unnecessary white space $searchTerms = explode(" ", $searchQuery); // Split the words $searchCondition = "($searchFieldName LIKE '%" . implode("%' OR $searchFieldName LIKE '%", $searchTerms) . "%')"; // Forming the condition for the sql $searchCondition .= " OR ($searchFieldName2 LIKE '%" . implode("%' OR $searchFieldName2 LIKE '%", $searchTerms) . "%')"; } // End Search $sql = "SELECT * FROM songs WHERE $searchCondition;"; // the rest is just database connection and retrieving the results $dblink = mysql_connect("poetskaraokecom.ipagemysql.com", "poets", "guest"); mysql_select_db("poets_songs", $dblink); $result = mysql_query($sql, $dblink); echo "<ol>"; // Capture the result in an array, and loop through the array while ($row = mysql_fetch_array($result, MYSQL_ASSOC)) { printf("<li>%s<font color='grey'> ... </font><i>%s</i></li>", $row[artist], $row[title]); } echo "</ol>"; //This counts the number or results - and if there wasn't any it gives them a little message explaining that $anymatches=mysql_num_rows($result); if ($anymatches == 0) { echo "No entries matched your query<br><br>"; } } ?> I haven't been able to determine whether my error is in my query of the database, or if it's in the return of the results. Any help would be much appreciated. Thanks, Cindy
  20. I have a table in MYSQL as follows Id-------NAME 1-------Black 2-------Red-- 3-------Green 4-------Black 5-------Green 6-------Yellow 7-------Orang 8-------White 9-------Black 10-------violet 11-------maroA 12-------indiA 13-------Blue 14-------Yellow 15-------Orane 16-------White 17-------White 18-------White I need to get the id of each color names where the condition matches unique names for each set of five rows and if any duplicate occurs then it has to be moved to end of the result. Note: I don’t want the count (max/min) as a result for each color names output: ID: 1 8 6 NAME: Black | white | yellow | violet | orange | - Black | white | yellow | violet | orange | - Blue| maroon | white| white | white | Kindly guide if this is possible to get MYSQL query
  21. Okay, I know some of you the past month or so know of the project I am working on right now. I have been pulling my hair out trying to figure out what is causing this issue today. I just got done moving my database from one server (most development) to another server (where it needs to be when its done). Now, the only thing I had to change after the move within my programming was the MySQL login/database info (i.e. username, password, database name, host). But...this is the problem. It no longer wants to insert the data from the form into the database, it's pretty much like it is not firing, even though it works fine on the other server. Does anybody have any suggestions on what could be causing this issue? Thanks ahead of time!!
  22. Hello I have two physically seperated server and i want to Read, Update and Insert into remote server's database. My connection code is working <?php $cn = mysql_connect("xxx.xxx.xxx.xxx:3306", "username", "password"); mysql_select_db("db_name", $cn); ?> however, when i try to retrieve data from remote server i got nothing to return. $sql = mysql_query("SELECT id FROM user_master WHERE user_id = '" .$name. "' AND user_pass = '" .$pass. "' LIMIT 1"); $row = mysql_fetch_array($sql); if(mysql_num_rows($sql) == 0) echo "wrong username or password"; else header("location: index.php"); What am i doing wrong ?
  23. To start off with I am really sorry if the title doesn't necessarily describe what I am trying to accomplish here and really didn't know how to title it. What I have is a form that user inputs information and then when they hit submit it takes them to the page with the code to insert the information into the sql server database. This page also, will send an email out with the some of the information based on one of the fields the user input information into. When the information is inserted into the database, I have a column named RefNumber, that the column settings for it are as follows: [RefNumber] [int] IDENTITY(1,1) NOT NULL I want to have this RefNumber displayed out to the user as well as have it in the emails that are sent out as a confirmation for that the email is associated with. Here is my code that I currently and if any let me know if I need to explain anything more clearly: <?php session_start(); if (!(isset($_SESSION['forteid']) && $_SESSION['forteid'] != '')) { header ("Location: login.php"); exit(); } ?> <?php error_reporting(E_ALL ^ E_NOTICE); include 'includes/db_connect.php'; $CallDispo = $_POST['disposition']; $NewNotes = str_replace("'", "", "$_POST[notes]"); if (trim($CallDispo) == "Revision" or trim($CallDispo) == "Revision/Save" or trim($CallDispo) == "Revision/Collection" or trim($CallDispo) == "Reinstatement") { $to = "dawn.okeefe@srb1.com"; $subject = "Revision - $_POST[appnumber]"; $message = "<Table border='1px' cellpadding='5' style='border:1px solid black; text-align: Left;'> <TR style='border:1px solid black; text-align: Left;'><td>ForteID:</td><td>$_POST[ForteID]</td></tr> <TR style='border:1px solid black; text-align: Left;'><td>AppNumber:</td><td>$_POST[appnumber]</td></tr> <TR style='border:1px solid black; text-align: Left;'><td>Date:</td><td>$_POST[date]</td></tr> <TR style='border:1px solid black; text-align: Left;'><td>Contract Number:</td><td>$_POST[Con_Number]</td></tr> <TR style='border:1px solid black; text-align: Left;'><td>Finance Number:</td><td>$_POST[Finance_Num]</td></tr> <TR style='border:1px solid black; text-align: Left;'><td>Phone Number:</td><td>$_POST[Phone_Num]</td></tr> <TR style='border:0px solid black; text-align: Left;'><td></td><td></td></tr> <TR style='border:1px solid black; text-align: Left;'><td>Discount Amount:</td><td>$_POST[Disc_Amount]</td></tr> <TR style='border:1px solid black; text-align: Left;'><td>New Total Cost:</td><td>$_POST[Total_Cost]</td></tr> <TR style='border:1px solid black; text-align: Left;'><td>Total Monthly Payments:</td><td>$_POST[Total_MP]</td></tr> <TR style='border:1px solid black; text-align: Left;'><td>New MP Amount:</td><td>$_POST[New_MP_Amt]</td></tr> <TR style='border:1px solid black; text-align: Left;'><td>New DP Amount:</td><td>$_POST[New_DP_Amt]</td></tr> <TR style='border:0 solid black; text-align: Left;'><td></td><td></td></tr> <TR style='border:1px solid black; text-align: Left;'><td>Notes:</td><td>$NewNotes</td></tr>"; } elseif (trim($CallDispo) == "Escalation"){ $to = "jeremy.nemens@srb1.com"; $subject = "Escalation - $_POST[appnumber]"; $message = "<Table border='1px' cellpadding='5' style='border:1px solid black; text-align: Left;'> <TR style='border:1px solid black; text-align: Left;'><td>ForteID:</td><td>$_POST[ForteID]</td></tr> <TR style='border:1px solid black; text-align: Left;'><td>AppNumber:</td><td>$_POST[appnumber]</td></tr> <TR style='border:1px solid black; text-align: Left;'><td>Date:</td><td>$_POST[date]</td></tr> <TR style='border:1px solid black; text-align: Left;'><td>Contract Number:</td><td>$_POST[Con_Number]</td></tr> <TR style='border:1px solid black; text-align: Left;'><td>Finance Number:</td><td>$_POST[Finance_Num]</td></tr> <TR style='border:1px solid black; text-align: Left;'><td>Phone Number:</td><td>$_POST[Phone_Num]</td></tr> <TR style='border:0px solid black; text-align: Left;'><td></td><td></td></tr> <TR style='border:1px solid black; text-align: Left;'><td>Notes:</td><td>$NewNotes</td></tr>"; } elseif (trim($CallDispo) == "Email Contract"){ $to = "jeff.starke@srb1.com"; $subject = "Email Contract - $_POST[appnumber]"; $message = "<Table border='1px' cellpadding='5' style='border:1px solid black; text-align: Left;'> <TR style='border:1px solid black; text-align: Left;'><td>ForteID:</td><td>$_POST[ForteID]</td></tr> <TR style='border:1px solid black; text-align: Left;'><td>AppNumber:</td><td>$_POST[appnumber]</td></tr> <TR style='border:1px solid black; text-align: Left;'><td>Date:</td><td>$_POST[date]</td></tr> <TR style='border:1px solid black; text-align: Left;'><td>Contract Number:</td><td>$_POST[Con_Number]</td></tr> <TR style='border:1px solid black; text-align: Left;'><td>Phone Number:</td><td>$_POST[Phone_Num]</td></tr> <TR style='border:0px solid black; text-align: Left;'><td></td><td></td></tr> <TR style='border:1px solid black; text-align: Left;'><td>Notes:</td><td>$NewNotes</td></tr>"; } elseif (trim($CallDispo) == "Send Contract/Invoice"){ $to = "nicole.lehew@srb1.com"; $subject = "Send Contract/Invoice - $_POST[appnumber]"; $message = "<Table border='1px' cellpadding='5' style='border:1px solid black; text-align: Left;'> <TR style='border:1px solid black; text-align: Left;'><td>ForteID:</td><td>$_POST[ForteID]</td></tr> <TR style='border:1px solid black; text-align: Left;'><td>AppNumber:</td><td>$_POST[appnumber]</td></tr> <TR style='border:1px solid black; text-align: Left;'><td>Date:</td><td>$_POST[date]</td></tr> <TR style='border:1px solid black; text-align: Left;'><td>Contract Number:</td><td>$_POST[Con_Number]</td></tr> <TR style='border:1px solid black; text-align: Left;'><td>Finance Number:</td><td>$_POST[Finance_Num]</td></tr> <TR style='border:1px solid black; text-align: Left;'><td>Phone Number:</td><td>$_POST[Phone_Num]</td></tr> <TR style='border:0px solid black; text-align: Left;'><td></td><td></td></tr> <TR style='border:1px solid black; text-align: Left;'><td>Notes:</td><td>$NewNotes</td></tr>"; } $headers = 'From: nick.curran@srb1.com' . "\r\n" . 'Reply-To: nick.curran@srb1.com' . "\r\n" . 'MIME-Version: 1.0' . "\r\n" . 'Content-type: text/html; charset=iso-8859-1' . "\r\n" . 'X-Mailer: PHP/' . phpversion(); //Insert to form data into database $tsql = "INSERT INTO logs(ForteID, disposition, appnumber, Finance_Num, num_payments, ach_cc, date, notes, Phone_Num, Cancel_Disposition, Con_Number, Post_Date, Total_Cost, Total_MP, New_MP_Amt, New_DP_Amt, Disc_Amount, Callback) VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)"; $parameters = array( $_POST[ForteID], $_POST[disposition], $_POST[appnumber], $_POST[Finance_Num], $_POST[num_payments], $_POST[ach_cc], $_POST[date], $NewNotes, $_POST[Phone_Num], $_POST[Cancel_Disposition], $_POST[Con_Number], $_POST[Post_Date], $_POST[Total_Cost], $_POST[Total_MP], $_POST[New_MP_Amt], $_POST[New_DP_Amt], $_POST[Disc_Amount], $_POST[Callback]); $stmt = sqlsrv_query($connection, $tsql, $parameters); // Send Email if(mail($to, $subject, $message, $headers)) echo "Email sent!<br>"; else echo "No email to be sent!<br>"; /* Free statement and connection resources. */ sqlsrv_free_stmt( $stmt); sqlsrv_close( $connection); header( "refresh:2;url=index.php" ); echo 'Your entry has been saved!'; exit(); ?> Thanks in advance!
  24. Right now I have a code that outputs results into a table: <?php include 'includes/db_connect.php'; $List = $_GET['List']; if( $connection === false ) { echo "Unable to connect.</br>"; die( print_r( sqlsrv_errors(), true)); } $query = " SELECT LISTCODE, YEAR, COUNT(YEAR) AS Count FROM Names GROUP BY LISTCODE, RIGHT(LISTCODE, 2), YEAR HAVING (RIGHT(LISTCODE, 2) = '$List') ORDER BY LISTCODE, YEAR "; $result = sqlsrv_query($connection,$query); // each array key is the database column name, the corresponding value is the legend/heading to display in the HTML table // the order of the items in this array are the order they will be output in the HTML table $fields = array('LISTCODE'=>'ListCode','YEAR'=>'Year','Count'=>'Count'); // start table and produce table heading echo "<table>\n<tr>"; foreach($fields as $legend){ echo "<th>$legend</th>"; } echo "</tr>\n"; // output table data while($row = sqlsrv_fetch_array( $result,SQLSRV_FETCH_ASSOC)) { echo "<tr>"; foreach($fields as $key=>$not_used) { echo "<td>$row[$key]</td>"; } echo "</tr>\n"; } echo "</table>\n"; sqlsrv_free_stmt ($result); sqlsrv_close( $connection); ?> That all works great and the attached picture originalqueryoutput is what it looks like. Just a little hard to read. What I would like to is have the output look something like the attached picture wantedqueryoutput, which I just did in excel to show an example of what I am going for. Is this possible? And how would I even begin to manipulate the data rows from the query to the table? Thanks in advance for the help!
  25. Hello all, I am working on this query to show past records of data for all of the records in this particular table. This is an archive table so there are multiple entries of the same person in the database. The difference is the date that they were entered, which is an auto entry value added on the date it is uploaded. Here is the query: "SELECT politicians.id, politicians.`Last Name`, politicians.`First Name`, politicians.`District`, archive.`firstname`, archive.`lastname`, archive.rank, archive.era FROM politicians, archive WHERE politicians.`Last Name`=archive.lastname AND politicians.`First Name`=archive.firstname ORDER BY date LIMIT 150"; The problem is that I only need the latest entry from the persons information and I am getting multiple from past dates. They need to be ordered by their past rank, but from the last date of the entry. Any ideas?? P.S I know I already posted this in the applications section. I posted it there by accident
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.