Jump to content

All Activity

This stream auto-updates     

  1. Today
  2. Ingolme

    = vs like

    If the string is not exactly 30 characters long, use VARCHAR instead of CHAR. CHAR adds additional null bytes as padding if the string is not long enough for the field.
  3. dsonesuk

    few checkbox checked, but count as one

    <!DOCTYPE html> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <meta name="viewport" id="viewport" content="target-densitydpi=high-dpi,initial-scale=1.0"> <title>Document Title</title> <style> #wrap {width: 20%; margin: 0 auto;} /* form {border:3px solid #ccc; padding: 15px; margin: 10px;}*/ form > table {width: 100%;} .single-count{} .text-right{text-align: right;} .vert-middle {vertical-align: middle; text-align: center;} </style> </head> <body> <div id="wrap"> <form name="myForm" action="#"> <table border="1" cellpadding="2" cellspacing="2"> <tr> <td style="width:80%;">(YB)Go/Walk-To/From</td> <td style="width:10%;"><input class="single-count" type="checkbox" name="chkboxGrp0[]" value="1" /></td> <td class="vert-middle" style="width:10%;">0</td> </tr> <tr> <td>(YB)Bring-Stack-Comic</td> <td><input class="single-count" type="checkbox" name="chkboxGrp1[]" value="1" /></td> <td class="vert-middle">0</td> </tr> <tr> <td colspan="3">(YB)Pick-up</td> </tr> <tr> <td class="text-right">TV-Remote</td> <td><input class="single-count" type="checkbox" name="chkboxGrp2[]" value="1" /></td> <td class="vert-middle" rowspan="4">0</td> </tr> <tr> <td class="text-right">Cup & Cookies</td> <td><input class="single-count" type="checkbox" name="chkboxGrp2[]" value="1" /></td> </tr> <tr> <td class="text-right">Comic</td> <td><input class="single-count" type="checkbox" name="chkboxGrp2[]" value="1" /></td> </tr> <tr> <td class="text-right">Video-Controller</td> <td><input class="single-count" type="checkbox" name="chkboxGrp2[]" value="1" /></td> </tr> <tr> <td>(YB)Hold-Milk-Carton</td> <td><input class="single-count" type="checkbox" name="chkboxGrp3[]" value="1" /></td> <td class="vert-middle">0</td> </tr> <tr> <td>(YB)Pour-Cup</td> <td><input class="single-count" type="checkbox" name="chkboxGrp4[]" value="1" /></td> <td class="vert-middle">0</td> </tr> <tr> <td colspan="3">(YB)Carry-X</td> </tr> <tr> <td class="text-right">Cup & Cookies</td> <td><input class="single-count" type="checkbox" name="chkboxGrp5[]" value="1" /></td> <td class="vert-middle" rowspan="3">0</td> </tr> <tr> <td class="text-right">Comic</td> <td><input class="single-count" type="checkbox" name="chkboxGrp5[]" value="1" /></td> </tr> <tr> <td class="text-right">Video-Controller</td> <td><input class="single-count" type="checkbox" name="chkboxGrp5[]" value="1" /></td> </tr> <tr> <td colspan="3">(YB)Hold-X</td> </tr> <tr> <td class="text-right">TV-Remote</td> <td><input class="single-count" type="checkbox" name="chkboxGrp6[]" value="1" /></td> <td class="vert-middle" rowspan="3">0</td> </tr> <tr> <td class="text-right">Cup & Cookies</td> <td><input class="single-count" type="checkbox" name="chkboxGrp6[]" value="1" /></td> </tr> <tr> <td class="text-right">Video-Controller</td> <td><input class="single-count" type="checkbox" name="chkboxGrp6[]" value="1" /></td> </tr> <tr> <td colspan="2" style="font-weight: bolder;" class="text-right">Total Group Selected</td> <td style="text-align: center; font-weight: bolder;" class="text-right"><span id="chkboxGroupCount">0</span></td> </tr> </table> </form> <div>Selected: <span id="chkboxSelected">None!</span></div> </div> <script> var chkbox = document.getElementsByClassName('single-count'); var chkboxTotal = document.getElementsByClassName('vert-middle'); for (var i = 0; i < chkbox.length; i++) { chkbox[i].checked = false; chkbox[i].addEventListener('click', chkboxGrpCount); } function chkboxGrpCount() { for (var i = 0; i < chkboxTotal.length; i++) { chkboxTotal[i].innerHTML = "0"; } var inputNameArray = []; for (var i = 0; i < chkbox.length; i++) { var chkBoxNameStripSqrBraces = chkbox[i].name.replace('[]', ''); if (inputNameArray.indexOf(chkBoxNameStripSqrBraces) === -1 && chkbox[i].checked === true) { chkboxTotal[parseInt(chkBoxNameStripSqrBraces.replace('chkboxGrp', ''))].innerHTML = "1"; inputNameArray.push(chkBoxNameStripSqrBraces); } } document.getElementById('chkboxGroupCount').innerHTML = inputNameArray.length; if (inputNameArray.length === 0) { document.getElementById('chkboxSelected').innerHTML = "None!"; document.getElementById('chkboxSelected').style.color = "black"; } else { document.getElementById('chkboxSelected').innerHTML = inputNameArray.toString(); } if (inputNameArray.length !== chkboxTotal.length) { document.getElementById('chkboxSelected').style.color = "red"; } else { document.getElementById('chkboxSelected').innerHTML = "ALL Selected"; } } </script> </body> </html>
  4. Yesterday
  5. Sigmahokies

    few checkbox checked, but count as one

    Here example look like:
  6. Ayodeji

    W3CSS- Collapsing the navigation bar

    Can someone please help? I am trying to use the w3css- collapsing the navigation bar. I copied the snippet into my code but the navigation bar is not even showing in the browser window. I don't know why it is not showing at all talk less of functioning properly. I have attached my code. Can someone please figure out this for me. index.html
  7. ameliabob

    Simple download

    I am trying to get a url that returns a json file but nothing seems to work nor do I get any errors <html> <body> <h1>Trial of getting url</h1> <?php echo "Hello World!"; $url = "https://api.iextrading.com/1.0/stock/market/batch?types=quote&filter=symbol,companyName,latestPrice,latestSource&symbols=AMD,APVO,DHI,ERI,GERN,LUV,LX,NVCR,TAP,WAR"; $url="https://www.espn.com"; $ans = fopen($url, "r"); ?> </body> </html> It should return the following: AMD quote symbol "AMD" companyName "Advanced Micro Devices Inc." latestPrice 15.8 latestSource "Close" APVO quote symbol "APVO" companyName "Aptevo Therapeutics Inc." latestPrice 5.54 latestSource "Close" DHI quote symbol "DHI" companyName "D.R. Horton Inc." latestPrice 40.75 latestSource "Close" ERI quote symbol "ERI" companyName "Eldorado Resorts Inc." latestPrice 44.25 latestSource "Close"
  8. caradri

    = vs like

    hi. this was working until now. and the string is exactly like in database. the data type is nchar(30), and looks like in the database its fill the string with white spaces to get length 30. may the datatype do that problem? something can make a change?
  9. Ingolme

    = vs like

    The semi-colon will not break the query, it will simply be ignored. The = operator will only return a row if the entire field exactly matches what is being searched. If you want to find rows that contain the search string along with more content then you must use the LIKE operator. If you think the fields do match exactly, make sure that they don't actually have spaces, tabs or other invisible characters that might be interfering with the search.
  10. dsonesuk

    few checkbox checked, but count as one

    If you mean three different attribute named grouped value checkbox inputs of three of each <!DOCTYPE html> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <meta name="viewport" id="viewport" content="target-densitydpi=high-dpi,initial-scale=1.0"> <title>Document Title</title> <style> #wrap {width: 20%; margin: 0 auto;} form {border:3px solid #ccc; padding: 15px; margin: 10px;} .single-count{} </style> </head> <body> <div id="wrap"> <form name="myForm" action="#"> <label>chkboxGrp1</label> <input class="single-count" type="checkbox" name="chkboxGrp1[]" value="1" /> <input class="single-count" type="checkbox" name="chkboxGrp1[]" value="2" /> <input class="single-count" type="checkbox" name="chkboxGrp1[]" value="3" /> <hr> <label>chkboxGrp2</label> <input class="single-count" type="checkbox" name="chkboxGrp2[]" value="4" /> <input class="single-count" type="checkbox" name="chkboxGrp2[]" value="5" /> <input class="single-count" type="checkbox" name="chkboxGrp2[]" value="6" /> <hr> <label>chkboxGrp3</label> <input class="single-count" type="checkbox" name="chkboxGrp3[]" value="7" /> <input class="single-count" type="checkbox" name="chkboxGrp3[]" value="8" /> <input class="single-count" type="checkbox" name="chkboxGrp3[]" value="9" /> </form> <div>Checkbox group total selected: <span id="chkboxGroupCount">0</span></div> <div>Selected: <span id="chkboxSelected"></span></div> </div> <script> var chkbox = document.getElementsByClassName('single-count'); for (var i = 0; i < chkbox.length; i++) { chkbox[i].addEventListener('click', chkboxGrpCount); } function chkboxGrpCount() { var inputNameArray = []; for (var i = 0; i < chkbox.length; i++) { var chkBoxNameStripSqrBraces = chkbox[i].name.replace('[]', ''); if (inputNameArray.indexOf(chkBoxNameStripSqrBraces) === -1 && chkbox[i].checked === true) { inputNameArray.push(chkBoxNameStripSqrBraces); } } document.getElementById('chkboxGroupCount').innerHTML = inputNameArray.length; document.getElementById('chkboxSelected').innerHTML = inputNameArray.toString(); } </script> </body> </html>
  11. dsonesuk

    = vs like

    If that is exactly what you use, then maybe you should try it without the semicolon within the SQL query
  12. caradri

    = vs like

    Hi, all. I have a strange issue, i think. i have a sql database and a simple select query "select * from tablename where columname='stringtosearch'; " this work fine until today, today only works with like: "select * from tablename where columname LIKE '%stringtosearch%'; " WHY???😭
  13. gordonisnz

    W3CSS sidebar, and footer issues

    Hello. This is a brand new website & i'm upgrading my website to use W3CSS in other pages & creating this brand new site. http://tv.kwister.com/index1.php I am having difficulty in setting up a page with a side menu, & middle / footer. Do not worry about colours, i'm only using the weird colours too see what I am doing. 1) My sidebar is a quarter of the screen (I may reduce it later on..). The main body of the page uses style="margin-left:25%" - Is it possible to allow the sidebar to be a variable with - to increase or decrease depending on the text included in the sidebar (with a bit of padding), and also the main part of the screen to auto increase too ? I used the w3-quarter and w3-rest css parts but when i put text in the main body, it gets "hidden" by the sidebar. Ive changed it to w3-row and w3-col using the GRID system, but the text in the main screen is still hidden. Can this be fixed ? 2) Also, with the footer. I cant seem to move it under both the side and main parts of the screen (teal color). The footer part only goes across the bottom of the main part of the screen. Is there a way to fix this without using "style" at all ? & just CSS3 ? (edit - Changed to http://tv.kwister.com/index1.php - Using sidebar. index.php does not use sidebar)
  14. Last week
  15. i can spell html5!

    styling my link pages

    sorry to have to ask such a noob question but here goes. my pages has the all the folders (7 deadly sins, you play too loose!, not understanding starting hands etc.) I'm going to need but I'm not sure how to reference them in css. each page will of course have slightly different styles going on and I'm not sure how to reference them in css. heres the code(s) <div class="vbar"> <div class="vbartitle">In The Beginning</div> <ul> <li><a href="7.html"> The 7 Deadly Sins</a></li> <li><a href="loose.html"> You Play Too Loose!</a></li> <li><a href="hands.html"> (Not Understanding) Starting Hands</a></li> <li><a href="oop.html"> Playing Out Of Posistion</a></li> <li><a href="sel.html"> Be More Selective </a></li> <li><a href="co.html"> Commitment</a></li> <li><a href="take.html"> Take Advantage</a></li> <li><a href="tilt.html"> Stop Tilting!</a></li> </ul> </div> and the css .vbar{ position:absolute; left: 434px; top: 87px; width: 200px; border:1px solid #999; margin:100px 0px 10px 12px; text-align: center; } .vbartitle{ background-color: #ADD8E6; padding: 12px; text-align: center; font-weight:bold; } .vbar ul { list-style:none; padding: 0px; margin: 0px; } .vbar ul li { list-style:none; padding: 0px; margin: 0px; } .vbar ul li a{ display:block; padding: 10px; color:#000; text-decoration:none; border-bottom:1 px solid #f1f1f1; } .vbar ul li a:hover{ color: white; background-color: #0000FF; border-bottom:1px dashed #000; }
  16. JMRKER

    few checkbox checked, but count as one

    Well, I'm glad it solved your problems, but I don't know how it did. Can you give an example of the HTML layout with 3 groups of 3 checkbox and show how clicking on 2 and 1 and 2 in each of the groups (A,B,C) makes a total of 9 checked boxes?
  17. Dayo

    ASK THE WEB MASTERS

    I am building a pure HTML & CSS Website and I want to add a page for visitors to download audio. In the web page i want the visitors to be able to search for the audios by Year, or Name or Alphabetically, how do i go about the code and arranging the audio in the html code i need an example.
  18. Dayo

    ASK THE WEB MASTERS

    I suggest this title for everyone who wants to develop a web page or write a code and needs an assistant in a certain point but can't get any lecture concerning that on any tutorial, the person can ask the question here for someone who has an experience in that to provide a solution.
  19. dsonesuk

    few checkbox checked, but count as one

    I don't see how that would work with 3 different named groups of checkboxes? it sums up selected checkbox values of groups, not the number of groups selected.
  20. Sigmahokies

    few checkbox checked, but count as one

    Hey, hey! I just fixed what I want. all i have to remove "+" from =. it count as one! Thank you so much!
  21. Sigmahokies

    few checkbox checked, but count as one

    That is not what I am asking for. I am asking for to have few checkbox have been checked, but count as one. For example, If I put nine checkboxes on website, then I divide nine checkboxes into three group: Three checkboxes in one group, then three checkboxes in second group, then three checkboxes in third group, suppose someone click checkboxes two out of three checkboxes in first group, click one out of three checkboxes in second one, then click two out of three checkboxes in third one, so script would count three checked because it showed someone did it all nine checkboxes which divided into three group that will count as three checked. Get it? Please forgive me, English is not my primary language, it is my second language. My primary language is ASL. Thanks, Gary
  22. Badchip

    Protect PHP renaming with a pin number

    Then I just need to change the PHP name periodically & automatically.
  23. warrens0017

    session_start(): cannot send session cache limiter

    It had to be BOM. I just deleted the file and recreated it with using just work and then copied and pasted it into a bran new accedit.php page. IDK why my editors were not able to detect the BOM but that was is. Thank you all for the help.
  24. justsomeguy

    Pivot and Summarizing Text Rows

    SQL doesn't work that way, each column has a single value. What you can do is do a query that shows you how many companies sell each product, and another query that shows which products are not sold by any company. You can do another one to list every company that sells a particular product. For one of them: SELECT p.usn, p.web_short_description, COUNT(*) AS num_sellers FROM products AS p INNER JOIN companyoffering AS o ON p.usn=o.usn GROUP BY p.usn, p.web_short_description This should list products not sold by anyone: SELECT * FROM products WHERE usn NOT IN (SELECT usn FROM companyofferings) This will do the same thing and may be faster depending on how many records are in the tables: SELECT * FROM products AS p WHERE NOT EXISTS (SELECT * FROM companyofferings AS o WHERE p.usn=o.usn) And then to list companies: SELECT * FROM companies AS c WHERE EXISTS (SELECT * FROM companyofferings AS o WHERE o.brand_id=c.brand_id AND o.usn=123) You'll need to enter the USN you want to figure out which companies sell in that query.
  25. justsomeguy

    session_start(): cannot send session cache limiter

    It's saying that the output starts on the line before you use session_start, and the only thing you're showing on that line is the opening PHP tag. Assuming there is not a space before the opening PHP tag, it's got to be the BOM. The BOM does not appear as a character in the text editor, but it's there when it saves the file, and like anything else outside of the PHP block, PHP will send all of that as output to the browser. You need to explicitly save without the BOM. In Sublime, that's File -> Save With Encoding -> UTF-8. When you open a file without a BOM in Sublime and just hit save, it will not add the BOM back if it isn't already there, you don't need to always save files like that after you do it once. Although other editors might add it back in without you telling it to.
  26. dsonesuk

    session_start(): cannot send session cache limiter

    Do you call the header() function, use php cookies, anywhere in your other scripts.
  27. warrens0017

    session_start(): cannot send session cache limiter

    I used Visual Studios, NotePad++, Sublime Text; All of them show that there is no UTF-8 BOMs.
  1. Load more activity
×