Jump to content

Search the Community

Showing results for tags 'column'.

  • 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 10 results

  1. If I use the following commands: ALTER TABLE yourtab CHANGE `$colname1` `$colname2` VARCHAR(20) NOT NULL; ALTER TABLE yourtab MODIFY `$colname1` `$colname2` VARCHAR(20) NOT NULL; ALTER TABLE yourtab CHANGE COLUMN `$colname1` `$colname2` VARCHAR(20) NOT NULL; And because I use a variable inside a loop I can change an array of column names. The challenge I'm facing is that VARCHAR or other type formats are obviously obliged. is that true? Is there a possibility to change a column name and keep the type set as the original table create settings?
  2. My question is, if it is possible, to change the name of the column with MYSQL. (not with php) This is my example: mysql> select * from horses; +------------+---------------+-----------------------+---------------------+---------------------+-----------------------------+ | num | name | location | created_day | changed_day | key_value | +------------+---------------+-----------------------+---------------------+---------------------+-----------------------------+ | 1 | Horse Riding | http://www.camping.fr | 2017-03-30 13:40:16 | 2017-10-19 18:14:57 | Horse, Riding, Woods | | 2 | Horseriding77 | http://www.wine.com | 2017-10-27 10:16:59 | 2017-10-27 10:16:59 | Outdoor, Vacances, Test | | 3 | Horsetours45 | http://www.fake.com | 2017-10-23 16:18:17 | 2017-10-23 16:18:17 | Outdoor, Vacances, Test | | 4 | Horsetours57 | http://www.bing.com | 2017-10-23 17:24:32 | 2017-10-23 17:24:32 | Outdoor, Vacances, Test | | 5 | Horseriding48 | http://www.test.com | 2017-10-25 09:05:18 | 2017-10-25 09:05:18 | Outdoor, Vacances, Test | | 6 | Horseriding67 | http://www.google.uk | 2017-10-27 10:11:18 | 2017-10-27 10:11:18 | Outdoor, Vacances, Test | | 7 | Horseriding52 | http://www.google.es | 2017-10-26 17:00:05 | 2017-10-26 17:00:05 | Outdoor, Vacances, Test | | 8 | Horseriding57 | http://www.google.fr | 2017-10-27 12:13:38 | 2017-10-27 12:13:38 | Outdoor, Vacances, Test | +------------+---------------+-----------------------+---------------------+---------------------+-----------------------------+ 8 rows in set (0.03 sec) mysql> the idea is that for example location as a column name is changed by mysql into other names.
  3. In PHPmyadmin I can't move the position of the columns. So when I go to change/modify (not sure how it's called in English) I get the possibility to move column and the place it after another column then where its placed now. Though, it does print the query it goes like ALTER TABLE `my_tab` CHANGE `col1` `col1` TINYINT(1) NULL DEFAULT NULL AFTER `col5`; I have not tested in the mysql console, but in PHP the columns don't move (anymore) like they did do beforehand.
  4. Hi I'm looking for php/mysql code to find identical input in a mysql database column.
  5. hello, Maby you can help me make somthing I have done things myself but i am a litle stuck it has somthing to do with my admin of product list like you can see in the picture i have done alot but now i want to ad a percentage i know that it has somthing to do with taking the result out of the column named (winstverlies) and devide that trough the purchese price and multiply this by 100 but i can not implement this in my code. the code is PHP so who can help me? so i want it to look like on the picture. is this posible? picture is in the file named percentage.jpg So i would be verry pleasd if you could help me?
  6. I dropped a column (linknum) in a table (wine) with mysql in the console After that I wanted to make it again ALTER TABLE wine ADD linknum INT DEFAULT '1' NOT NULL AUTO_INCREMENT PRIMARY KEY FIRST; but now I recieve an error message like this: ERROR 1067 (42000): Invalid default value for 'linknum' How can I solve it, and create a column called linknum again, starting with 1 and incrementing 1 ?
  7. Ok so I have been looking for how to do this all day(Very long time) and I can't find it anywhere. What I am trying to do is power my website with what I call URL variables the things that YouTube uses E.G. Page.php?video=1 but when it comes to selecting data from my database I have an issue. I have a table for ID and some others I will call them EX1 to EX5, what I am trying to do is the URL "?" thing says a number and that number is turned into a variable(don't know how) but that variable indicates the ID, but I don't want to put the ID on the page, I want the ID to tell my PHP code where in the tables the EX1 - EX5 are, so they can become a variable for later use on the page. Sum up. PHP takes the URL?name=1 turns into variable(1) - variable indicates where in the columns to look LOOKS UNDER ID finds 1 - now it needs to make the EX1 - EX5 in the same column into variables. ID EX1 EX2..... 1 I don't know how to do this can anyone help me?
  8. I have a working drop down menu almost perfectly styled. It functions however I want the submenus to appear in column rows not straight down. Here is my current HTML and CSS. Thanks in advance! <div id="navbar"> <ul id="dropdown"> <li class="topnav"><a href="#">Item One</a> <ul> <div class="column"> <li><a href="#">Subitem One</a></li> <li><a href="#">Second Subitem</a></li> <li><a href="#">3rd Subitem</a></li> </div> <div class="column"> <li><a href="#">Subitem One</a></li> <li><a href="#">Second Subitem</a></li> <li><a href="#">3rd Subitem</a></li> </div> <div class="column"> <li><a href="#">Subitem One</a></li> <li><a href="#">Second Subitem</a></li> <li><a href="#">3rd Subitem</a></li> </div> </ul> </li> </ul></div> #navbar { width: 100%; border-bottom: 1px solid #ccc; padding: 10 10 10 10; }#dropdown { width: 960px; margin: 0 auto; padding: 0; height: 1em; text-transform: uppercase; text-align: center; font-weight: bold; }#dropdown li { list-style: none; float: left; }#dropdown li a { display: block; padding: 3px 8px; text-decoration: none; }#dropdown li ul { display: none; width: 10em; /* Width to help Opera out */ background-color: #fff; } #dropdown li:hover ul, #navbar li.hover ul { display: block; position: absolute; margin: 0; padding: 0; border-bottom: 1px solid #ccc; }#dropdown li:hover li, #navbar li.hover li { float: none; }#dropdown li:hover li a, #navbar li.hover li a { background-color: #fff; color: #000; }.topnav a { color: #000; text-decoration: none; }.topnav a:hover { border-bottom: 1px solid gold; }.column {list-style-type: none;float: right;margin: 5px 0 0 0;padding: 0 5px 0 0;width:180px; }.column a { color: #999; text-decoration: none; font-size: .7em; }.column a:hover { border-bottom: 0px; }
  9. I'm using the CSS below to turn a list of links into columns for the footer: [font='Helvetica Neue', Arial, Verdana, sans-serif]#footernav {[/font]width: 90%;padding: 20 20 20 20;}.footernavee ul {list-style-type: none;float: right;margin: 10px 0 0 0;padding: 0 10px 0 0;width:240px;}.footernavee {color: #999;text-align: right;text-transform: uppercase;}.footernavee a {color: #999;text-transform: uppercase;text-decoration: none;font-size: .7em;} It's working but the columns appear oddly staggered. How can I align the columns vertically to the top of the div they are in? Thanks in advance!
  10. So, i have this table of three rows and three columns. I want that when i mouse over a cell, the entire row and column of that cell gets highlighted. And of course, i want a pure CSS solution. For the rows, it is easy because i can just implement the ":hover" selector over the <tr> tag. However, i can't implement over the ":hover" selector onto <colgroup> or <col> tags. That is becauase, all browsers implement such tag with no height nor width. Even if i try to add a width and height, the browser debugger will immediately show that such values will be reset to zero. <!DOCTYPE html><html><head> <title></title><style type="text/css"> table { border: 1px solid black; border-collapse: separate; } col:nth-child(2n+1) { width: 40px; background-color: violet; } col:hover { /*Doesn't work*/ background-color: aqua; } td { border: 1px solid black; text-align: center; width: 20px; height: 20px; } td:hover { background-color :red; /*Doesn't work*/ top: 0px; left: auto; height: 300%; /*position: fixed; /*breaks it completely*/ } tr { border: 1px solid black; } tr:hover { background-color: yellow; }</style></head><body><table> <colgroup> <col /> <col /> <col /> <col /> <col /> <col /> <col /> </colgroup> <tr> <td>1</td> <td>2</td> <td>3</td> </tr> <tr> <td>1</td> <td>2</td> <td>3</td> </tr> <tr> <td>1</td> <td>2</td> <td>3</td> </tr></table></body></html>
×
×
  • Create New...