Search Results

Search found 17788 results on 712 pages for 'last'.

Page 43/712 | < Previous Page | 39 40 41 42 43 44 45 46 47 48 49 50  | Next Page >

  • More efficient approach to XSLT for-each

    - by Paul
    I have an XSLT which takes a . delimted string and splits it into two fields for a SQL statement: <xsl:for-each select="tokenize(Path,'\.')"> <xsl:choose> <xsl:when test="position() = 1 and position() = last()">SITE = '<xsl:value-of select="."/>' AND PATH = ''</xsl:when> <xsl:when test="position() = 1 and position() != last()">SITE = '<xsl:value-of select="."/>' </xsl:when> <xsl:when test="position() = 2 and position() = last()">AND PATH = '<xsl:value-of select="."/>' </xsl:when> <xsl:when test="position() = 2">AND PATH = '<xsl:value-of select="."/></xsl:when> <xsl:when test="position() > 2 and position() != last()">.<xsl:value-of select="."/></xsl:when> <xsl:when test="position() > 2 and position() = last()">.<xsl:value-of select="."/>' </xsl:when> <xsl:otherwise>zxyarglfaux</xsl:otherwise> </xsl:choose> </xsl:for-each> The results are as follows: INPUT: North OUTPUT: SITE = 'North' AND PATH = '' INPUT: North.A OUTPUT: SITE = 'North' AND PATH = 'A' INPUT: North.A.B OUTPUT: SITE = 'North' AND PATH = 'A.B' INPUT: North.A.B.C OUTPUT: SITE = 'North' AND PATH = 'A.B.C' This works, but is very lengthy. Can anyone see a more efficient approach? Thanks!

    Read the article

  • PHP Dynamic Breadcrumb

    - by Adrian M.
    Hello, I got this code from someone and it works very well, I just want to remove the link from the last element of the array: //get rid of empty parts $crumbs = array_filter($crumbs); $result = array(); $path = ''; foreach($crumbs as $crumb){ $path .= '/' . $crumb; $name = ucfirst(str_replace(array(".php","_"),array(""," "), $crumb)); $result[] = "<a href=\"$path\">$name</a>"; } print implode(' > ', $result); This will output for example: Content Common File I just want a to remove the link from the last item - "File" to be just plain text.. I tried myself to count the array items and then if the array item is the last one then to print as plain text the last item.. but I'm still noob, I haven't managed to get a proper result.. Thank you!

    Read the article

  • DotNetNuke + XPath = Custom navigation menu DNNMenu HTML render

    - by Rui Santos
    I'm developing a skin for DotNetNuke 5 using the Component DNN Done Right menu by Mark Alan which uses XSL-T to convert the XML sitemap into an HTML navigation. The XML sitemap outputs the following structure: <Root > <root > <node id="40" text="Home" url="http://localhost/dnn/Home.aspx" enabled="1" selected="0" breadcrumb="0" first="1" last="0" only="0" depth="0" > <node id="58" text="Child1" url="http://localhost/dnn/Home/Child1.aspx" enabled="1" selected="0" breadcrumb="0" first="1" last="0" only="0" depth="1" > <keywords >Child1</keywords> <description >Child1</description> <node id="59" text="Child1 SubItem1" url="http://localhost/dnn/Home/Child1/Child1SubItem1.aspx" enabled="1" selected="0" breadcrumb="0" first="1" last="0" only="0" depth="2" > <keywords >Child1 SubItem1</keywords> <description >Child1 SubItem1</description> </node> <node id="60" text="Child1 SubItem2" url="http://localhost/dnn/Home/Child1/Child1SubItem2.aspx" enabled="1" selected="0" breadcrumb="0" first="0" last="0" only="0" depth="2" > <keywords >Child1 SubItem2</keywords> <description >Child1 SubItem2</description> </node> <node id="61" text="Child1 SubItem3" url="http://localhost/dnn/Home/Child1/Child1SubItem3.aspx" enabled="1" selected="0" breadcrumb="0" first="0" last="1" only="0" depth="2" > <keywords >Child1 SubItem3</keywords> <description >Child1 SubItem3</description> </node> </node> <node id="65" text="Child2" url="http://localhost/dnn/Home/Child2.aspx" enabled="1" selected="0" breadcrumb="0" first="0" last="1" only="0" depth="1" > <keywords >Child2</keywords> <description >Child2</description> <node id="66" text="Child2 SubItem1" url="http://localhost/dnn/Home/Child2/Child2SubItem1.aspx" enabled="1" selected="0" breadcrumb="0" first="1" last="0" only="0" depth="2" > <keywords >Child2 SubItem1</keywords> <description >Child2 SubItem1</description> </node> <node id="67" text="Child2 SubItem2" url="http://localhost/dnn/Home/Child2/Child2SubItem2.aspx" enabled="1" selected="0" breadcrumb="0" first="0" last="1" only="0" depth="2" > <keywords >Child2 SubItem2</keywords> <description >Child2 SubItem2</description> </node> </node> </node> </root> </Root> My Goal is to render this XML block into this HTML Navigation structure only using UL's LI's, etc.. <ul id="topnav"> <li> <a href="#" class="home">Home</a> <!-- Parent Node - Depth0 --> <div class="sub"> <ul> <li><h2><a href="#">Child1</a></h2></li> <!-- Parent Node 1 - Depth1 --> <li><a href="#">Child1 SubItem1</a></li> <!-- ChildNode - Depth2 --> <li><a href="#">Child1 SubItem2</a></li> <!-- ChildNode - Depth2 --> <li><a href="#">Child1 SubItem3</a></li ><!-- ChildNode - Depth2 --> </ul> <ul> <li><h2><a href="#">Child2</a></h2></li> <!-- Parent Node 2 - Depth1 --> <li><a href="#">Child2 SubItem1</a></li> <!-- ChildNode - Depth2 --> <li><a href="#">Child2 SubItem2</a></li> <!-- ChildNode - Depth2 --> </ul> </div> </li> </ul> Can anyone help with the XSL coding? I'm just starting now with XSL..

    Read the article

  • How do i get direct Descendants with html agility pack

    - by acidzombie24
    I have a specific html node and i want to get the 2nd aka last direct descendant. So after writing .Descendants("div") i wrote ls.Last(). I actually got the last div in the 2nd descendant. Not what i am expecting. How do i get only the direct descendants? or how do i get the descendant with a specific classname? because "div.postBody" would be a suitable alternative.

    Read the article

  • How to select all options from a drop list in php / mysql

    - by Mirage81
    Thanks to stackoverflow.com's frienly experts I've managed to create my first php + mysql application. The code searches a mysql database for last names and cities. The choices are made through two drop lists like these: Choose city: All cities Liverpool Manchester Choose last name: All last names Lennon Gallagher The code would return eg. all the Lennons living in Liverpool. However, I haven't been able to make the options "All cities" and "All last names" to work so that the code would return eg. all the Lennons living in any city or all the people living in Liverpool. So, how can that be done? The code so far: index.php <?php $conn = mysql_connect('localhost', 'user', 'password') or die("Connection failed"); mysql_select_db("database", $conn) or die("Switch database failed"); //this gets the cities from the database to the drop list $query = "SELECT DISTINCT city FROM user".mysql_real_escape_string($city); $result = mysql_query($query, $conn); $options=""; while ($row=mysql_fetch_array($result)) { $city=$row["city"]; $options.="<OPTION VALUE=\"$city\">".$city; } //this gets the last names from the database to the drop list $query2 = "SELECT DISTINCT lastname FROM user".mysql_real_escape_string($lastname); $result2 = mysql_query($query2, $conn); $options2=""; while ($row2=mysql_fetch_array($result2)) { $lastname=$row2["lastname"]; $options2.="<OPTION VALUE=\"$lastname\">".$lastname; } ?> <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <meta content="text/html; charset=ISO-8859-1" http-equiv="content-type"> <title>test</title> </head> <body> <form action="get.php" method="post"> <p> <select name="city"> <option value=0>Choose <option value=1>All cities <?=$options?> </select> </p> <p> <select name="lastname"> <option value=0>Choose <option value=1>All last names <?=$options2?> </select> </p> <p> <input value="Search" type="submit"> </p> </form> <br> </body> </html> get.php <?php $conn = mysql_connect('localhost', 'user', 'password') or die("Connection failed"); mysql_select_db("database", $conn) or die("Switch database failed"); $query = "SELECT * FROM user WHERE city = '".mysql_real_escape_string($_POST['city'])."' AND lastname = '".mysql_real_escape_string($_POST['lastname'])."'"; $result = mysql_query($query, $conn); echo $rowcount; $zerorows=true; while ($row = mysql_fetch_assoc($result)) { $zerorows=false; echo '<b>City: </b>'.htmlspecialchars($row[city]).'<br />'; echo '<b>Last name: </b>'.htmlspecialchars($row[lastname]).'<br />'; echo '<b>Information: </b>'.htmlspecialchars($row[information]).'<br />'.'<br />'; } if($zerorows) echo "No results"; mysql_close($conn); ?>

    Read the article

  • Drupal Exposed Views Filter custom date

    - by Jack
    I have a date filter that I have exposed on my view. I want to make the interface more user friendly and tighten up the look of it. Instead of selecting a date I would like to select from the following options. The last day The last week The last year All This would then filter on the date field. Is this possible? How would you go about doing this?

    Read the article

  • Breadth first search all paths

    - by Amndeep7
    First of all, thank you for looking at this question. For a school assignment we're supposed to create a BFS algorithm and use it to do various things. One of these things is that we're supposed to find all of the paths between the root and the goal nodes of a graph. I have no idea how to do this as I can't find a way to keep track of all of the alternate routes without also including copies/cycles. Here is my BFS code: def makePath(predecessors, last): return makePath(predecessors, predecessors[last]) + [last] if last else [] def BFS1b(node, goal): Q = [node] predecessor = {node:None} while Q: current = Q.pop(0) if current[0] == goal: return makePath(predecessor, goal) for subnode in graph[current[0]][2:]: if subnode[0] not in predecessor: predecessor[subnode[0]] = current[0] Q.append(subnode[0]) A conceptual push in the right direction would be greatly appreciated. tl;dr How do I use BFS to find all of the paths between two nodes?

    Read the article

  • Multiple instances of this carousel on a single page - can't get it to work

    - by Andy
    This code comes from a tutorial so it's not originally my own work. What I am trying to do is implement this several times on a single page. I have tried and so far failed - by numbering the id "carousel" and so forth. Any help would be seriously appreciated. I'm tearing my hair out. http://jsfiddle.net/AndyMP/zcKDV/5/ For completeness.. this is the carousel JQuery as it stands. //rotation speed and timer var speed = 5000; var run = setInterval('rotate()', speed); //grab the width and calculate left value var item_width = $('#slides li').outerWidth(); var left_value = item_width * (-1); //move the last item before first item, just in case user click prev button $('#slides li:first').before($('#slides li:last')); //set the default item to the correct position $('#slides ul').css({'left' : left_value}); //if user clicked on prev button $('#prev').click(function() { //get the right position var left_indent = parseInt($('#slides ul').css('left')) + item_width; //slide the item $('#slides ul').animate({'left' : left_indent}, 200,function(){ //move the last item and put it as first item $('#slides li:first').before($('#slides li:last')); //set the default item to correct position $('#slides ul').css({'left' : left_value}); }); //cancel the link behavior return false; }); //if user clicked on next button $('#next').click(function() { //get the right position var left_indent = parseInt($('#slides ul').css('left')) - item_width; //slide the item $('#slides ul').animate({'left' : left_indent}, 200, function () { //move the first item and put it as last item $('#slides li:last').after($('#slides li:first')); //set the default item to correct position $('#slides ul').css({'left' : left_value}); }); //cancel the link behavior return false; }); //if mouse hover, pause the auto rotation, otherwise rotate it $('#slides').hover( function() { clearInterval(run); }, function() { run = setInterval('rotate()', speed); } ); //a simple function to click next link //a timer will call this function, and the rotation will begin :) function rotate() { $('#next').click(); }

    Read the article

  • Nil string with [NSString stringWithFormat:] appears as "(null)"

    - by Supernico
    I have a 'Contact' class with two properties : firstName and lastName. When I want to display a contact's full name, here is what I do: NSString *fullName = [NSString stringWithFormat:@"%@ %@", contact.firstName, contact.lastName]; But when the firstName and/or lastName is set to nil, I get a "(null)" in the fullName string. To prevent it, here's what I do: NSString *first = contact.firstName; if(first == nil) first = @""; NSString *last = contact.lastName; if(last == nil) last = @""; NSString *fullName = [NSString stringWithFormat:@"%@ %@", first, last]; Does someone know a better/more concise way to do this?

    Read the article

  • How to create view model without sorting collections in memory.

    - by Chevex
    I have a view model (below). public class TopicsViewModel { public Topic Topic { get; set; } public Reply LastReply { get; set; } } I want to populate an IQueryable<TopicsViewModel> with values from my IQueryable<Topic> collection and IQueryable<Reply> collection. I do not want to use the attached entity collection (i.e. Topic.Replies) because I only want the last reply for that topic and doing Topic.Replies.Last() loads the entire entity collection in memory and then grabs the last one in the list. I am trying to stay in IQueryable so that the query is executed in the database. I also don't want to foreach through topics and query replyRepository.Replies because looping through IQueryable<Topic> will start the lazy loading. I'd prefer to build one expression and have all the leg work done in the lower layers. I have the following: IQueryable<TopicsViewModel> topicsViewModel = from x in topicRepository.Topics from y in replyRepository.Replies where y.TopicID == x.TopicID orderby y.PostedDate ascending select new TopicsViewModel { Topic = x, LastReply = y }; But this isn't working. Any ideas how I can populate an IQueryable or IEnumerable of TopicsViewModel so that it queries the database and grabs topics and that topic's last reply? I am trying really hard to avoid grabbing all replies related to that topic. I only want to grab the last reply. Thank you for any insight you have to offer.

    Read the article

  • Passing delimited string to stored procedure to search database

    - by rs
    How can i pass a string delimited by space or comma to stored procedure and filter result? I'm trying to do something like - Parameter Value -------------------------- @keywords key1 key2 key3 Then is stored procedure i want to first find all records with first or last name like key1 filter step 1 with first or last name like key2 filter step 2 with first or last name like key 3

    Read the article

  • Data historian queries

    - by Scott Dennis
    Hi, I have a table that contains data for electric motors the format is: DATE(DateTime) | TagName(VarChar(50) | Val(Float) | 2009-11-03 17:44:13.000 | Motor_1 | 123.45 2009-11-04 17:44:13.000 | Motor_1 | 124.45 2009-11-05 17:44:13.000 | Motor_1 | 125.45 2009-11-03 17:44:13.000 | Motor_2 | 223.45 2009-11-04 17:44:13.000 | Motor_2 | 224.45 Data for each motor is inserted daily, so there would be 31 Motor_1s and 31 Motor_2s etc. We do this so we can trend it on our control system displays. I am using views to extract last months max val and last months min val. Same for this months data. Then I join the two and calculate the difference to get the actual run hours for that month. The "Val" is a nonresetable Accumulation from a PLC(Controller). This is my query for Last months Max Value: SELECT TagName, Val AS Hours FROM dbo.All_Data_From_Last_Mon AS cur WHERE (NOT EXISTS (SELECT TagName, Val FROM dbo.All_Data_From_Last_Mon AS high WHERE (TagName = cur.TagName) AND (Val > cur.Val))) This is my query for Last months Max Value: SELECT TagName, Val AS Hours FROM dbo.All_Data_From_Last_Mon AS cur WHERE (NOT EXISTS (SELECT TagName, Val FROM dbo.All_Data_From_Last_Mon AS high WHERE (TagName = cur.TagName) AND (Val < cur.Val))) This is the query that calculates the difference and runs a bit slow: SELECT dbo.Motors_Last_Mon_Max.TagName, STR(dbo.Motors_Last_Mon_Max.Hours - dbo.Motors_Last_Mon_Min.Hours, 12, 2) AS Hours FROM dbo.Motors_Last_Mon_Min RIGHT OUTER JOIN dbo.Motors_Last_Mon_Max ON dbo.Motors_Last_Mon_Min.TagName = dbo.Motors_Last_Mon_Max.TagName I know there is a better way. Ultimately I just need last months total and this months total. Any help would be appreciated. Thanks in advance

    Read the article

  • Dynamically including multiple files within php for image descriptions

    - by Steve Jones
    Working on implementing image descriptions to a php run gallery and can't seem to figure out how to call each text file for each individual image. //total number of images $total = 77; //max number of thumbnails per page $max = 9; //what image do we want to start from? $startcount = $_GET["start"]; //if there is not a defined starting image, we start with the first if(empty($startcount)) { $startcount = 0; } //start off the loop at 1 $loop = 1; //start the loop while($loop <= $max) { //for the picture labels $num = $startcount + $loop; if($num > $total) { $num = $num - 1; break; } // Add class="last" to every third list item if(is_int($num / 3)) { $last = ' class="last"'; } else { $last = ""; } //the code for the image echo ' <li'.$last.'><a href="images/portfolio/pic-'.$num.'.jpg" rel="milkbox[gall1]"><img src="images/portfolio/thumbs/pic-'.$num.'-thumb.jpg" width="256" height="138" alt="Thumbnail of image '.$num.'" /></a><div>'.$num.'</div></li>'; I see that I can call the text files by number using '.$num.' (I have 77 individual text files with a phrase in each) but how do I tell it to call the files?

    Read the article

  • Unreasonable errors in merge sort

    - by Alexxx
    i have the following errors - please help me to find the error: 9 IntelliSense: expected a '}' 70 4 it points on the end of the code - but there are no open { anywhere!! so why?? 8 IntelliSense: expected a ';' 57 1 it points on the { after the void main but why to put ; after the { of the void main?? Error 7 error C1075: end of file found before the left brace '{' at 70 1 points to the beginig of the code - why??? #include <stdio.h> #include <stdlib.h> void merge(int *a,int p,int q,int r) { int i=p,j=q+1,k=0; int* temp=(int*)calloc(r-p+1, sizeof(int)); while ((i<=q)&& (j<=r)) if(a[i]<a[j]) temp[k++]=a[i++]; else temp[k++]=a[j++]; while(j<=r) // if( i>q ) temp[k++]=a[j++]; while(i<=q) // j>r temp[k++]=a[i++]; for(i=p,k=0;i<=r;i++,k++) // copy temp[] to a[] a[i]=temp[k]; free(temp); } void merge_sort(int *a,int first, int last) { int middle; if(first < last) { middle=(first+last)/2; merge_sort(a,first,middle); merge_sort(a,middle+1,last); merge(a,first,middle,last); { } void main() { int a[] = {9, 7, 2, 3, 5, 4, 1, 8, 6, 10}; int i; merge_sort(a, 0, 9); for (i = 0; i < 10; i++) printf ("%d ", a[i]);

    Read the article

  • jQuery Supersized Plugin callback when slideshow finishd

    - by Nic Hubbard
    I am using the Supersized jQuery plugin which makes images fullscreen and also implements a slideshow. Currently, this plugin does not have a callback for when the slideshow is finished, rather, it just continually repeats. Is there a way that I could trigger a function after the last slide is shown? Currently, I have it working to trigger a function when the last slide STARTS to be shown, as I have a setInterval which checks for the "last" class on the slideshow images. But, this runs the function when that last slide starts, not when it is finished. Does anyone have ideas on how I could accomplish this?

    Read the article

  • StringIndexOutOfBoundsException: String index out of range 0

    - by Evan F
    I'm trying to write a program to take the first letter of the user input to generate a username. I'm trying to write it so that if the user leaves the input blank, then the letter that would otherwise be taken to generate the username defaults to the letter 'z'. Here is my full code: import java.util.Scanner; /** UsernameGenerator.java Generates a username based on the users inputs. @author: Evan Fravert */ public class UsernameGenerator { /** * Generates a username based on the users inputs. *@param args command line argument */ public static void main(String[] args) { // abcde String first; String middle; String last; String password1; String password2; int randomNum; randomNum = (int) (Math.random() * 1000) + 100; Scanner userInput = new Scanner(System.in); System.out.println("Please enter your first name:"); first = userInput.nextLine(); String firstLower = first.toLowerCase(); System.out.println("Please enter your middle name:"); middle = userInput.nextLine(); String middleLower = middle.toLowerCase(); System.out.println("Please enter your last name:"); last = userInput.nextLine(); int lastEnd = last.length()-1; String lastLower = last.toLowerCase(); System.out.println("Please enter your password:"); password1 = userInput.nextLine(); System.out.println("Please enter your password again:"); password2 = userInput.nextLine(); char firstLetter = firstLower.charAt(0); char middleLetter = middleLower.charAt(0); char lastLetter = lastLower.charAt(0); char lastLast = lastLower.charAt(lastEnd); if first.length() == 0) { firstLetter = 'z'; } else { firstLetter = firstLower.charAt(0); } System.out.println("Your username is " + firstLetter + "" + middleLetter + "" + lastLetter + "" + "" + lastLast + "" + randomNum); System.out.println("Your password is " + password1); System.out.println("Welcome " + first + " " + middle + " " + last + "!"); } }

    Read the article

  • Java date processing

    - by Don
    Hi, Given an instance of java.util.Date which is a Sunday. If there are 4 Sundays in the month in question, I need to figure out whether the chosen date is 1st Sunday of month 2nd Sunday of month 2nd last Sunday of month Last Sunday of month If there are 5 Sundays in the month in question, then I need to figure out whether the chosen date is 1st Sunday of month 2nd Sunday of month 3rd Sunday of month 2nd last Sunday of month Last Sunday of month I've had a look in JodaTime, but haven't found the relevant functionality there yet. The project is actually a Groovy project, so I could use either Java or Groovy to solve this. Thanks, Donal

    Read the article

  • accessing nth element (value) of a vector after sorting

    - by memC
    dear experts, This question is an extension of this question I asked. I have a std::vector vec_B.which stores instances of class Foo. The order of elements in this vector changes in the code. Now, I want to access the value of the current "last element" or current 'nth' element of the vector. If I use the code below to get the last element using getLastFoo() method, it doesn't return the correct value. For example, to begin with the last element of the vector has Foo.getNumber() = 9. After sorting it in descending order of num, for the last element, Foo.getNumber() = 0. But with the code below, it still returns 9.. that means it is still pointing to the original element that was the last element. What change should I make to the code below so that "lastFoo" points to the correct last element? class Foo { public: Foo(int i); ~Foo(){}; int getNum(); private: int num; }; Foo:Foo(int i){ num = i; } int Foo::getNum(){ return num; } class B { public: Foo* getLastFoo(); B(); ~B(){}; private: vector<Foo> vec_B; }; B::B(){ int i; for (i = 0; i< 10; i++){ vec_B.push_back(Foo(i)); } // Do some random changes to the vector vec_B so that elements are reordered. For // example rearrange elements in decreasing order of 'num' //... } Foo* B::getLastFoo(){ &vec_B.back(); }; int main(){ B b; Foo* lastFoo; lastFoo = b.getLastFoo() cout<<lastFoo->getNumber(); return 0; }

    Read the article

  • MySQL Search (Sort by Relevance)

    - by atif089
    Hi guys, Can any one help me how to sort rows by relevance for the following criterion ? tbluser First Name Last Name tbleduc School College University On the search form the user has following fields Name School College University Where School College and University are Optional.. And Name is split into 2 words (other words in middle are omitted), first word is taken as first anme and last word as last name.. Now I would like to implement search based on relevance. Thanks for the help :)

    Read the article

  • SQL Server 2008 - Update a temporary table

    - by user336786
    Hello, I have stored procedure in which I am trying to retrieve the last ticket completed by each user listed in a comma-delimited string of usernames. The user may not have a ticket associated with them, in this case I know that i just need to return null. The two tables that I am working with are defined as follows: User ---- UserName, FirstName, LastName Ticket ------ ID, CompletionDateTime, AssignedTo, AssignmentDate, StatusID TicketStatus ------------ ID, Comments I have created a stored procedure in which I am trying to return the last completed ticket for a comma-delimited list of usernames. Each record needs to include the comments associated with it. Currently, I'm trying the following: CREATE TABLE #Tickets ( [UserName] nvarchar(256), [FirstName] nvarchar(256), [LastName] nvarchar(256), [TicketID] int, [DateCompleted] datetime, [Comments] text ) -- This variable is actually passed into the procedure DECLARE @userList NVARCHAR(max) SET @userList='user1,user2,user2' -- Obtain the user information for each user INSERT INTO #Tickets ( [UserName], [FirstName], [LastName] ) SELECT u.[UserName], u.[FirstName], u.[LastName] FROM User u INNER JOIN dbo.ConvertCsvToTable(@userList) l ON u.UserName=l.item At this point, I have the username, first and last name for each user passed in. However, I do not know how to actually get the last ticket completed for each of these users. How do I do this? I believe I should be updating the temp table I have created. At the same time, id do not know how to get just the last record in an update statement. Thank you!

    Read the article

  • Basic CSS question regarding background images for divs

    - by Mike
    I'm a programmer trying to learn some css and I've already run into a stumbling block. I have the following HTML: <div class="container"> <div class="span-24 last"> Header </div> <div class="span-4"> Left sidebar </div> <div class="span-16"> <div class="span-8"> Box1 </div> <div class="span-4"> Box2 </div> <div class="span-4 last"> Box3 </div> <div class="span-16 last"> Main content </div> </div> <div class="span-4 last"> Right sidebar </div> <div class="span-24 last"> Footer </div> </div> In my css I have the following: body { background-color:#FFFFFF; } div.container { background:url(/images/bck.jpg); } I just want to display an image for the background area for the container div but nothing shows up. If I remove the background section from the css and add background-color:#000000; then I see a black background for the container div. What am I overlooking?

    Read the article

  • Best way to update record X when Y is inserted

    - by Saif Bechan
    I have a huge table that is mainly used for backup and administrative purposes. The only records that matters is the last inserted record. On every hit to order by time inserted is just too slow. I want keep a separate table with the last inserted id. In PHP I now insert, get last inserted id, and update the other table. Is there a more efficient way to do this.

    Read the article

  • comparing rows on a mysql table

    - by user311324
    Ok here's the deal I got one table with a bunch of client information. Each client makes up to one purchase a year which is represented by an individual row. there's a column for the year and there's a column the contains a unique identifier for each client. What I need to do is to construct a query that takes last year and this year and shows me which clients were here made a purchase last year but not make a purchase this year. I also need to build a query that shows me which clients did not make a purchase last year and the year before last but did make a purchase this year.

    Read the article

< Previous Page | 39 40 41 42 43 44 45 46 47 48 49 50  | Next Page >