Jump to content

Search the Community

Showing results for tags 'columns'.



More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • W3Schools
    • General
    • Suggestions
    • Critiques
  • HTML Forums
    • HTML/XHTML
    • CSS
  • Browser Scripting
    • JavaScript
    • VBScript
  • Server Scripting
    • Web Servers
    • Version Control
    • SQL
    • ASP
    • PHP
    • .NET
    • ColdFusion
    • Java/JSP/J2EE
    • CGI
  • XML Forums
    • XML
    • XSLT/XSL-FO
    • Schema
    • Web Services
  • Multimedia
    • Multimedia
    • FLASH

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


AIM


MSN


Website URL


ICQ


Yahoo


Jabber


Skype


Location


Interests


Languages

Found 11 results

  1. Hi I would like to know how to fetch all columns from a table. Not the data in the table, but only the names of the columns. I made a script. I tested the query first in the console giving me a good result in the section Field . Can someone please explain how to use this in PHP ? code example: <?php // test set up for fetching column names $servername = "localhost"; $username = "name"; $password = "pass123"; $dbname = "test_database"; // $conn = new mysqli($servername, $username, $password, $dbname); if ($conn->connect_error) { die("Connection failed: " . $conn->connect_error); } if ($stmt = $conn->prepare("SHOW COLUMNS FROM test_table ")) { $stmt->execute(); $row = $stmt->fetch(); var_dump($stmt); var_dump($row); foreach ($row as $value) { var_dump($value); } } $stmt->close(); $conn->close(); ?> EDIT: I solved the script in the following way. <?php $stmt = $conn->prepare("SHOW COLUMNS FROM test_table"); $stmt->execute(); $res = $stmt->get_result(); var_dump($res); foreach ($res as $val){ $col = $val['Field']; var_dump($col); } ?> You have to remove the if part and the {} and replace it with the code above.
  2. hello programmers am having an update issue and i dont know how to go about it am gonna try n explain it the way i can plz bear with me. i have a table called bids and two important column called bidder and tagged when (bidder 5) has no one to tag he simple drops a bid and when another bidder comes along(bidder 3) he tags (bidder 5) i want bidder 5 row to update showing (bidder 3)in his row. for example bidder 5 place bid it looks like this bidder tagged 5 0 no one to tag so it shows zero i want if bidder 5 get tagged by bidder 3 it update showing the person that tag bidder 5 and it will look like this bidder tagged 5 3 from the image i attached u can simply understand what am saying. looking forward to ur replies thanks code i am using to fill the form is below // tag someone $query = "SELECT b.*, u.nick FROM " . $DBPrefix . "bids b LEFT JOIN " . $DBPrefix . "users u ON (u.id = b.bidder) WHERE b.bidder NOT IN ('b.tagged') and b.tagged IN ('b.bidder') and b.auction = :auc_id "; $params = array(); $params[] = array(':auc_id', $id, 'int'); $db->query($query, $params); $i = 0; while ($row = $db->fetch()) { $template->assign_block_vars('tag_bidder', array( 'ID' => $row['bidder'], 'NAME' => $row['nick'], 'TAGGED' => $row['tagged'] )); $i++; }
  3. Here is my code: <!DOCTYPE html><html lang="en"><head> <link rel='stylesheet' href='style.css'/><meta charset="utf-8"/><title>title</title><style></style><script>window.onerror = function(a, b, c, d){alert('Javascript Error:n'+a+'nURL: '+b+'nLine: '+c+' Column: '+d);return true;}</script><script>'use strict';window.onload = init;function init() {var str = "<h3>Available Products:</h3>";for (var key in products){str += products[key].name +" $"+ products[key].price +"<br/>";}document.getElementById("products").innerHTML = str;}function add(item){cart.push(products[item]);var str = "<h3>Items in your cart:</h3>";for (var key in cart){ str += cart[key].name +" $"+ cart[key].price +"<br/>";}document.getElementById("cart").innerHTML = str;console.log(products[item]);};function item(name,price){ this.name = name; this.price = price;};function add(item){var sum = 0;cart.push(products[item]);var str = "<h3>Items in your cart:</h3>";for (var key in cart){ str += cart[key].name +" $"+ cart[key].price +"<br/>"; sum += Number(cart[key].price);} str += '<br/><b>Total = $' + sum.toFixed(2) +'</b>';document.getElementById("cart").innerHTML = str;console.log(products[item]);}var products = [];products["milk"] = new item("Milk",2.89)products["eggs"] = new item("Eggs",1.72)products["candybar"] = new item("Candy bar",0.87)products["soda"] = new item("Soda",1.99)products["water"] = new item("Water",1.29)products["cereal"] = new item("Cereal",1.87)products["donut"] = new item("Donut",1.09)products["chips"] = new item("Chips",1.99)products["magazine"] = new item("Magazine",2.79)products["nwspaper"] = new item("Newspaper",0.99)products["bagel"] = new item("Bagel",0.99)products["fruit"] = new item("Fruit",1.99)products["cgrtts"] = new item("Cigarettes",5.99)products["batteries"] = new item("Batteries",3.99)var cart = [];function buyItem() { var buy = prompt("What item do you want to buy?").toLowerCase(); switch(buy){ case 'milk':add("milk");break; case 'eggs':add("eggs");break; case 'candy bar':add("candybar");break; case 'soda':add("soda");break; case 'water':add("water");break; case 'cereal':add("cereal");break; case 'donut':add("donut");break; case 'chips':add("chips");break; case 'magazine':add("magazine");break; case 'newspaper':add("nwspaper");break; case 'bagel':add("bagel");break; case 'fruit':add("fruit");break; case 'cigarettes':add("cgrtts");break; case 'batteries':add("batteries");break; default: alert("We do not sell that item!"); console.log("We do not sell that item!"); }}</script></head><body><div class="header"> <h3 style="font-family: corsiva; font-size: 25; color: indigo;">Cash Register<h3></div><div class="left"> <button style="font-family: corsiva; font-size:22; border:2px solid black; border-radius: 100%;" onclick="buyItem()"><strong>What item do you want to buy?</strong></button><div class="right"> <div id="products"> </div> <div id="cart"> </div></div><div class="footer"> <h5>Brooke Simmerman</h5></div></body></html> What I would like is for the list of products to appear in two columns so that I have space for more items. With what I have now, some of the items continue vertically into the footer div. I would rather they continue in another column next to the first. How do I do this?
  4. I am new to web building and have built some pages. I have one that will build a tree view with JS and make 3 columns. However, when I link it via target="iframe_a", it has but 1 column and scrolling. I just need a pointer in the right direction
  5. Hey there, I know this is somewhat of a rookie problem, but I'm a little rusty on the subject of float, since my more recent projects haven't dealt with it much. I have created a two-column layout (main content and a navigation sidebar) with floating divs. However, at a certain zoom level the sidebar is kicked down below the main content div. I'm trying to figure out how to keep the two columns side-by-side on the page, no matter what the zoom level is. I used to know how to do this, but as I said, I'm a little rusty in this department. Any help would be greatly appreciated. The url is: http://www.zyggywebs.com body { background-color: white; background-image: url(banner-new2.jpg); background-position: center top; background-attachment: fixed; background-size: 160%; color: black; padding: 20px;}a { color: yellow;}a:hover { color: steelblue;}#header { background-color: black; background-position: left bottom; color: white; padding: 10px; height: 130px; border-radius: 1em;}#main { float: left; width: 960px; background-color: black; opacity: 0.800; color: white; padding-left: 20px; padding-top: 20px; padding-bottom: 20px; padding-right: 20px; min-height: 700px;}#sidebar { float: left; background-color: black; color: white; height: 500px; width: 200px; margin-right: 10px; margin-left: 10px; text-align: center; border-radius: 1em; opacity: 0.800;}#sidebar img { max-width: 150px; border: none;}#footer { clear: both; background-color: black; color: white; padding: 10px; margin-top: 20%; border-radius: 1em;}#galleries img { width: 20%;}.section { padding-bottom: 25px;}
  6. khan1992

    CSS3 Columns

    I am having trouble keeping my content within the divs or sorted in column. They seem to be ever expanding. I have tried have 3 divs with each set 400px each set to float within a 1200px container. and thought this would contain them but they appear in one line. Also tried using the css3 columns but that is also doing the same thing. I have no idea where i went wrong? This is the HTML <!DOCTYPE html><head><html><title>Untitled Document</title><link href="mainstylesheet.css" rel="stylesheet" type="text/css" /><link href="textcss.css" rel="stylesheet" type="text/css"><link href="infotray.css" rel="stylesheet" type="text/css"><meta charset="utf-8"></head><body><div class="wrapper"><div class="header"><div class="headeropacity"></div><div id="navbar"><ul id="nav"><li><a href="#DKSND.asp">HOME</a></li><li><a href="#news.asp">NEWS</a></li><li><a href="#about.asp">COURSES</a></li><li><a href="#about.asp">ABOUT US</a></li><div id="pointer"></div></ul> </div></div><div class="content1"> <h2>Heading</h2> <p>wjkdnsidn </p> <p> </p> <p> </p> <p> </p> <p> </p> <p> </p></div><div class="content2"> <h2>Heading</h2><div class="rollinfotray"><div class="infobox1"></div><div class="infobox2"> </div><div class="infobox3"></div><div class="infobox1"></div></div></div><div class="content3"><div class="contentcontainer"><div class="left"> <h2>Heading</h2> Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Vestibulum tortor quam, feugiat vitae, ultricies eget, tempor sit amet, ante. Donec eu libero sit amet quam egestas semper. Aenean ultricies mi vitae est. Mauris placerat eleifend leo. Quisque sit amet est et sapien ullamcorper pharetra. Vestibulum erat wisi, condimentum sed, commodo vitae, ornare sit amet, wisi. Aenean fermentum, elit eget tincidunt condimentum, eros ipsum rutrum orci, sagittis tempus lacus enim ac dui. Donec non enim in turpis pulvinar facilisis. Ut felis. Praesent dapibus, neque id cursus faucibus, tortor neque egestas augue, eu vulputate magna eros eu erat. Aliquam erat volutpat. Nam dui mi, tincidunt quis, accumsan porttitor, facilisis luctus, metus <p> </p> <p> </p> <p> </p> <p> </p> <p> </p> <p> </p></div><div class="middle"> <h2>Heading</h2> Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Vestibulum tortor quam, feugiat vitae, ultricies eget, tempor sit amet, ante. Donec eu libero sit amet quam egestas semper. Aenean ultricies mi vitae est. Mauris placerat eleifend leo. Quisque sit amet est et sapien ullamcorper pharetra. Vestibulum erat wisi, condimentum sed, commodo vitae, ornare sit amet, wisi. Aenean fermentum, elit eget tincidunt condimentum, eros ipsum rutrum orci, sagittis tempus lacus enim ac dui. Donec non enim in turpis pulvinar facilisis. Ut felis. Praesent dapibus, neque id cursus faucibus, tortor neque egestas augue, eu vulputate magna eros eu erat. Aliquam erat volutpat. Nam dui mi, tincidunt quis, accumsan porttitor, facilisis luctus, metus.</div><div class="right"> <h2>Heading</h2> Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Vestibulum tortor quam, feugiat vitae, ultricies eget, tempor sit amet, ante. Donec eu libero sit amet quam egestas semper. Aenean ultricies mi vitae est. Mauris placerat eleifend leo. Quisque sit amet est et sapien ullamcorper pharetra. Vestibulum erat wisi, condimentum sed, commodo vitae, ornare sit amet, wisi. Aenean fermentum, elit eget tincidunt condimentum, eros ipsum rutrum orci, sagittis tempus lacus enim ac dui. Donec non enim in turpis pulvinar facilisis. Ut felis. Praesent dapibus, neque id cursus faucibus, tortor neque egestas augue, eu vulputate magna eros eu erat. Aliquam erat volutpat. Nam dui mi, tincidunt quis, accumsan porttitor, facilisis luctus, metus.</div> </div></div><div class="footer"> <h2>Footerlinks</h2> <p> </p> <div class="contentcontainer"><p class="three-col">Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Vestibulum tortor quam, feugiat vitae, ultricies eget, tempor sit amet, ante. Donec eu libero sit amet quam egestas semper. Aenean ultricies mi vitae est. Mauris placerat eleifend leo. Quisque sit amet est et sapien ullamcorper pharetra. Vestibulum erat wisi, condimentum sed, commodo vitae, ornare sit amet, wisi. Aenean fermentum, elit eget tincidunt condimentum, eros ipsum rutrum orci, sagittis tempus lacus enim ac dui. Donec non enim in turpis pulvinar facilisis. Ut felis. Praesent dapibus, neque id cursus faucibus, tortor neque egestas augue, eu vulputate magna eros eu erat. Aliquam erat volutpat. Nam dui mi, tincidunt quis, accumsan porttitor, facilisis luctus, metus</p> <p> </p> <p> </p> <p> </p> <p> </p> </div></div></div></body></html> And related CSS @charset "utf-8";@import url("navigationcss.css");html, body { margin: 0; padding: 0; white-space: nowrap;}.header,.content1,.content2,.content3,.footer{ float: left; width: 100%; text-align:center; line-height:130%; overflow:hidden; }.contentcontainer{ width: 1200px; margin-right: auto; margin-bottom: auto; }.left,.middle,.right{width:400px;float:left;}.wrapper { height: 100%; width: 100%;}.header { }.content1 {}.content2 { background-color: #222;}.content3 { background-color: #999; }.footer { background-color: #CCC;} @charset "utf-8";h2 { font-family: Verdana, Geneva, Arial, Helvetica, sans-serif; font-size: 20pt; color: navy; padding-top: 12px; padding-bottom: 3px; opacity:2;}.three-col { -moz-column-count: 3; -moz-column-gap: 20px; -webkit-column-count: 3; -webkit-column-gap: 20px;}
  7. Ingolme

    HELP!

    I'm trying to get my site to work but it won't. My subtitle won't rotate and the right column is too far down. Here's the code: <HTML><BODY oncontextmenu='return false'><script language=javascript 1.2>j1 = "first sentence"j2 = "second sentence"j3 = "third sentence"j4 = "punchline"foreach(Number=0;Number<4;Number=Number+1)setTImeout("jContainer.innerHTML=eval('jNumber')",5)</SCRIPT><HEAD><TABLE border="1" borderleft=Aquamarine bgcolor=blue><img src="banner.gif"><H1>My Website<H1><!-- Changing subtitle --><font name="jContainer">Subtitle</font></TABLE></HEAD><font face="Arial"><!--left column--><TABLE align=left bgcolor=CCCCCC><tr><td><menu><li><a style="text-decoration:none;;" href="index.html"><font color="orange">Home</font></a><li><a style="text-decoration:none;;" href="index2.html"><font color="orange">About Us</font></a><li><a style="text-decoration:none;;" href="index3.html"><font color="orange">Contact</font></a></menu></td></tr></TABLE><!-- center area --><TABLE align=center bgcolor=#999><tr><td><font color="DarkBlue" face="Arial"><font size="6" color="red">Just added new script</font><p>2013/04/01</br><p align="center">&nbsp&nbsp&nbsp&nbspI added a new script that will make text in the banner change every five seconds, I hope it works.</br><hr></br></br></br></br></br><font size="6" color="red">Opening new website</font><p>2013/03/31</br><p align="center">&nbsp&nbsp&nbsp&nbspI'm finally opening my new website, I hope you like it. It works best in Internet Explorer so please upgrade <a href="http://windows.microsoft.com/en-us/internet-explorer/downloads/ie-9/worldwide-languages">here</a></br><hr></br></br></br></br></tr></td></font></TABLE><!--Right column--><TABLE align=right bgcolor=CCCCCC><tr><td><h3>My other sites</h3><a style="text-decoration:none;;" href=http://dtfox.deviantart.com>Art</a></br><a style="text-decoration:none;;" href=http://w3schools.invisionzone.com/index.php?showuser=18212>W3Schools</a></br></td></tr></TABLE><!-- FOOTER --><TABLE><tr><td>Page is copyright to Ingolme. Please don't steal my code. I worked hard on this. <font size=7>April Fools</font></td></tr></TABLE></BODY> <!-- Add this line at the end of the content --></br clear="both">
  8. JoReL

    CSS: 2 columns

    I have this menu with tabs on it for deferent info on products. The problems is that in this tab i added a list of two columns, but the info i placed on the list wont show. I dont have problems with the other tabs, thinking there might be a problem on the css or bad sintax.Code on css: #lateral_X{width: 100px;background-color: #CCCCCC;float:left;}#lateral_Y{margin-left:190px;background-color: #FFFFFF;border:#000000 1px solid;} code HTML <div id="panel_02"> <div id="lateral_X"> <li><p>Functions</p></li> <li><p>blablabla</p></li> <li><p>blablabla</p></li> <li><p>*Product</p></li> <li><p>*Product</p></li> <li><p>*Product</p></li> <li><p>*Product</p></li> </div> <div id="lateral_Y"> <li><p>Functons</p></li> <li><p>blablabla</p></li> <li><p>blablabla</p></li> <li><p>*Product</p></li> <li><p>*Product</p></li> <li><p>*Product</p></li> <li><p>*Product</p></li> </div></div>
  9. <?phprequire_once('includes/i_rsslib.php');require_once('functions/f_lib.php');?><!DOCTYPE html><html><head><title>Daily Sports Guide</title><link type="text/css" rel="stylesheet" href="style/style.css"><link type="text/css" rel="stylesheet" href="style/suckerfish.css"></head><body><div id="wrapper"><?php require_once('includes/i_header.php'); ?> <div style='margin: 5px; padding: 5px; border: 1px solid white; height: auto; clear: both; overflow: hidden;'><div style='float: left; width: 48%; height: 100%; border: 1px solid blue; overflow: hidden;'>Four score and seven years ago our fathers brought forth on this continent, a new nation, conceived in Liberty, and dedicated to the proposition that all men are created equal.Now we are engaged in a great civil war, testing whether that nation, or any nation so conceived and so dedicated, can long endure. We are met on a great battle-field of that war.We have come to dedicate a portion of that field, as a final resting place for those who here gave their lives that that nation might live. It is altogether fitting and proper that we should do this.But, in a larger sense, we can not dedicate -- we can not consecrate -- we can not hallow -- this ground. The brave men, living and dead, who struggled here, have consecrated it, far above our poor powerto add or detract. The world will little note, nor long remember what we say here, but it can never forget what they did here. It is for us the living, rather, to be dedicated here to the unfinished workwhich they who fought here have thus far so nobly advanced. It is rather for us to be here dedicated to the great task remaining before us -- that from these honored dead we take increased devotion tothat cause for which they gave the last full measure of devotion -- that we here highly resolve that these dead shall not have died in vain -- that this nation, under God, shall have anew birth of freedom -- and that government of the people, by the people, for the people, shall not perish from the earth.</div><div style='float: left; width: 48%; height: 100%; border: 1px solid blue; overflow: hidden; margin: 0px 0px 0px 5px;'>Governor Stevenson, Senator Johnson, Mr. Butler, Senator Symington, Senator Humphrey, Speaker Rayburn, Fellow Democrats, I want to express my thanks to Governor Stevenson for his generous and heart-warming introduction.It was my great honor to place his name in nomination at the 1956 Democratic Convention, and I am delighted to have his support and his counsel and his advice in the coming months ahead.With a deep sense of duty and high resolve, I accept your nomination.I accept it with a full and grateful heart--without reservation-- and with only one obligation--the obligation to devote every effort of body, mind and spirit to lead our Party back to victory and our Nation back to greatness.I am grateful, too, that you have provided me with such an eloquent statement of our Party's platform. Pledges which are made so eloquently are made to be kept. "The Rights of Man"--the civil and economicrights essential to the human dignity of all men--are indeed our goal and our first principles. This is a Platform on which I can run with enthusiasm and conviction.</div></div> </div></body></html> So I have created this skeleton example of a two column layout. While the content of each column may vary I would like the borders of each column to match each other. I thought that I might be able to put the columns in a wrapper, float them and then use the 'height: 100%' CSS property on both columns. Unfortunately, solving the problem is not that simple. Does anyone know a way to do this? I had a layout before that was alright but if I could somehow get to the solution for this one it would look that much nicer. Is what I am trying to achieve with the layout possible? I uploaded a live copy to http://dailysportsguide.com/prototype/. Thanks again and in advance for any of your most useful comments and suggestions. P.S. I already have a plan to accomplish the same goal with some jQuery however if this can be done with CSS I would much prefer that method...
  10. <?phprequire_once('includes/i_rsslib.php');require_once('functions/f_lib.php');?><!DOCTYPE html><html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"><title>Daily Sports Guide</title><link type="text/css" rel="stylesheet" href="style/style.css"><link type="text/css" rel="stylesheet" href="style/suckerfish.css"></head><body> <div id="wrapper"> <?php require_once('includes/i_header.php'); ?> <!-- start columns left and right --><div id="container2"><div id="container1"> <div id="col1"><?php include("index_leftcolumn.html"); ?></div> <!-- column break --> <div id="col2"><div id="col2inner"><h4 id="latestFromDSG">Latest from DSG</h4><div style='margin: 5px; padding: 0px; color: white; background-color: black;'><?php require_once('index_twitterfeed.php'); ?></div></div></div> </div></div><!-- end columns left and right --> <div style='margin: 5px; padding: 0px; border: 1px solid white;'><p style='color: white;'>Facebook comments area:</p></div> </div></body></html> body { background-color: black; text-align: center; }img { border: none; margin: 0; padding: 0; }a:visited { color: white; } #wrapper { width: 800px; margin: 0px auto; color: white; background-color: black; border: 1px solid red; text-align: left; padding: 0px 0px 0px 0px; height: auto; overflow: hidden;} #header { margin: 0px; padding: 0px; width: 100%; height: 141px; }#hcolumnLeft { float: left; width: 300px; background-color: blue; margin: 0px; padding: 0px; color: white; height: 141px; }#hcolumnRight { float: right; margin: 0px; padding: 0px; color: white; background-color: black; width: 500px; height: 141px; text-align: right; } #container2 { clear:left; float:left; width:100%; overflow:hidden; background: black; }#container1 { float:left; width:100%; position:relative; right:30%; background: black; }#col1 { float:left; width:70%; position:relative; left:30%; overflow:hidden; }#col2 { float:left; width:30%; position:relative; left:30%; overflow:hidden; } #latestFromDSG { font-size: 16px; margin: 0px 0px 10px; padding: 5px; background: #0100FE; }#col2inner { margin: 5px; padding: 0px; border: 1px solid white; background-color: black; } For some reason when I look at the CSS in Firebug I see that the facebook comments area thinks that it starts all the way at the top of #wrapper. This is not my intent at all. In fact my intent is to have the facebook comments area starting below the two column layout but still inside #wrapper. As usual with CSS trying to figure this out is not at all logical to me and not at all easy to understand. I see what the problem is but I really feel clueless on how to fix it. I had it in mind to upload a live copy to my server but for some reason I can not determine yet my PHP includes which are working fine on my IIS, PHP server are not working at all when I upload the files to CentOS 6, PHP server. Really I have to get the CSS right before I can figure out what is wrong with Cent OS. Thanks in advance for any help, comments or suggestions...
  11. Bunnycorn

    Columns

    So, here's my question. I can make columns, I can edit the size, I can do all that stuff, but I can't get it to go actively down the page or get it to go into the background, if you need my source or anything please just ask. Also; although I doubt you'll be able to help me on this; is there any way to edit an actual in use source? Or even get a fresh one? I'm doing it for a school project and the one who's supposed to be getting the site is incredibly slow, and I don't have money to buy my own, nor would I spend that money to buy my own. I shall attach a copy of my source, incase you need to see it for whatever reason. Oh god...htm
×
×
  • Create New...