Jump to content

Nati323

Members
  • Posts

    93
  • Joined

  • Last visited

Posts posted by Nati323

  1. hey i have a big query that i insert with her data, now i want to insert to one column the value of another column from another table and to multiply this with some value i have, i try to do something like this:

    INSERT INTO tbname (sal) VALUES (another_table.column * 5)

    but the result is:

    Unknown column 'employees.salary' in 'field list'

     

    maybe its possible with insert into select, but i dont know how to combine this with other columns that i want to insert...

     

    thanks for your help !

  2. hey , in your website you wrote that DATETIME format is YYYY-MM-DD so my que is if its actually this format, or i can to insert their something like this: DD-MM-YYYY , or: DD/MM/YYYY.

    thanks :)

     

    EDIT: i check, i can't :{

  3. update: wird problem, i ask from someone else to try my code with html,body,div 100% height, and its work for him, he show me a picture, but on my computer its not work, i try in chrome and IE , i dont know whay its not work, maybe you know...?

  4. The 100% is applied to html, and body tag, note ONLY the outermost containers within body will stretch to full height using min-height: 100%.You could try giving the illusion the right column is hundred percent height, by using background element behind it, using position absolute.Element cutting into right column is cause by the floating of this right column, apply right margin to this element the same width as right column, OR try overflow: auto.Maybe due to the fact that the body has default margins and padding, try zeroing these.

    hey, the second advice works, i did margin right to the divs and all good.

     

    but about the first problem, i dont realy understand you, what do you mean that only the outsiders containers will strech?

    the right column is the second div in my page, and is parent is body,

     

    can you give me an example about what you say? background element? what to do exacli?

  5. hello, i have some problems with divs in my web site,

     

    the first one is that i have navigation bar, and i want that he will strech for all over the page, picture:

    550c213415ad3.png

     

    you can see were wrote 1, the div ends there, and the text from the left div continue below, i dont want this, i want that the blue div will strech until the end of the page and the text will be at the left of him.

    so i google it , and i found some websites that says that i need to do 100% height to html , body and div tags, so i did it but its dosent work.

    the div is floated to the right if its metter

     

    second problem:

    if you look at the middle of the image where the number two show you will see div with border marked in blue (i marked it with the debbuger of chrome), as you can see the div ends in the right navigation bar, inside him, i dont want this i want that he will end before the navigation bar.

     

     

     

     

  6. this is not the case, if you try to bold it like this:

    str.replace(/(^.)/gm, "<b>$1</b>");

    its works, anyway i try to solve this with function, i says maybe its work, so i did:

    function toup($m) { return $m.toUpperCase(); }document.getElementById("demo").innerHTML = str.replace(/^(.)/gm, toup("$1"));

    its dosent work, i dont know why, if i try to use the function like that:

    toup("hello")

    its returns HELLO, but with the reg match its dosent work.

    i thought that maybe the match dosent transform to the function, but if you change the function to:

    function toup($m) { return $m + "abc" }

    you will see the match + abc, so the match did transform to the function,so i am at a loss.i dont understand where the problem is...

  7. in the reference http://www.w3schools.com/jsref/jsref_regexp_begin.asp, you say that b search for a word at the beginning and the end of a word, i try it but its not work on the end of a word, why is that?

    the code:

        var str = "Visit W3SchoolsW3";     var patt1 = /(bW3)/g;    var result = str.match(patt1);    document.getElementById("demo").innerHTML = result;

    And with a big B, its works but you say there that a big B search a match that is not at the start or end of a word:

    var str = "Visit W3SchoolsW3";var patt1 = /BW3/g;var result = str.match(patt1);document.getElementById("demo").innerHTML=result;
  8. That's the default behavior. You can either specify some additional flags to make the replace global, or its more popular to use a regular expression with the global flag.https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/replace

    i did :

     

     

    var txt = "hello hello hello hello";document.write(txt.replace("hello", "bye", "g")); 

    dosent work, (IE 11)

×
×
  • Create New...