rain13
Members-
Posts
346 -
Joined
-
Last visited
Content Type
Profiles
Forums
Events
Everything posted by rain13
-
I found a little easier code. But how do I make margins look nice? with bottom: 5px; the margin from top and from bottom aren't equal. So I would need way to use browser's default margin. Also margin-right doesn't really work. Footer still comes into contact with browser's right side. How do I make that footer have right margin as large as left? <html<head><style type="text/css">.wrapper { background: #eee; padding: 15px 0 100px;} .footer { background: #ccc;width: 100%;bottom: 5px; position: fixed;}</style></head><body><div class="wrapper"> <div class="content"> ... Your Content Here ... </div></div><div class="footer"> ... Your Footer Here ...</div></body></html>
-
Hello.I would use some help with page footer. Firstly this example assumes that height of footer is 3em. How do I make it work with dynamic footer height? Secondly how do I use default margin with out causing scrollbars? I'd like to have default margin but when I remove margin: 0; from style part then I get unwanted scrollbar. The scrollbar should only appear if content doesnt fit. <!DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xml:lang="en" xmlns="http://www.w3.org/1999/xhtml" lang="en"><head><title>Pure CSS: Sticky Footer by Tom@Lwis (LWIS.NET)</title><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><meta name="author" content="Tom@Lwis (LWIS.NET)"><style type="text/css">/* Layout */html, body, #container { height: 100%; margin: 0; padding: 0; }body > #container { height: auto; min-height: 100%; }#content { padding-bottom: 3em; padding: 50px;}/* Theme */</style></head><body><div id="container"><div id="content"> <!-- optional code below --> <div id="about"> <p>This is an example of the Lwis CSS Sticky Footer.</p> </div> <!-- // end of optional code --></div></div><div style="background-color: black; color: white;margin-top: -3em;">My Sticky Footer</div></body></html> Thanks in advance
-
Hello. How can I make h2 only as tall as needed? In other words how do I minimize h2 height? <div><h2>heading 2</h2>abcd</div> Left side of image is as it is now. Right side of image is how I want it to be.
-
Hello I am having problem with case insensitive select: I have tried. SELECT LOWER( Name )FROM `users`WHERE LOWER(`Name`) = LOWER('somename') and SELECT LOWER( Name )FROM `users`WHERE LOWER(`Name`) LIKE LOWER('somename') But I get MySQL returned an empty result set (i.e. zero rows). ( Query took 0.0006 sec ). when somename has some upper case letters. How do I construct case insensitive select?Edit: I have also tried SELECT Name FROM users WHERE Name LIKE 'somename' but as soon as I change case of 'somename' it doesn't find anything.Edit: it didnt work because table was in binary encoding.
-
I figured I cant see GROUP BY effect as I only have 1 forum. I am starting to think that maybe i should use left join?I managed to come up with following. (would be interesting what you guys think of it) SELECT forum . * , COUNT( post.ForumID ) AS posts, post.ForumID AS pfid, (SELECT COUNT(topic.TopicID) FROM topic WHERE topic.ForumID = post.ForumID) AS topicsFROM forumLEFT JOIN post ON forum.ForumID = post.ForumIDLEFT JOIN topic ON post.TopicID = topic.TopicIDLIMIT 0 , 30
-
My bad. foregin key is ForumID In forum table ForumID is id of forum that is auto incremented.In post table I have ForumID which matches ForumID in forum tableIn topic table I have ForumID which matches ForumID in forum table However when I created tables I didnt use "foregin key" keyword but i guess relations mentioned above should be enough? Edit: Sofar I managed to write this: SELECT COUNT(`topic`.`ForumID`) as topics, COUNT(`post`.`ForumID`) as posts,`forum`.* FROM topic , `post` , `forum` GROUP BY forum.ForumIDwhich gives me. topics posts ForumID ParentID ForumName ForumType6 6 1 0 My site 1 But topics count should be 2 and posts count should be 3.
-
Hello. I have 3 tables: forum:ForumID|col1|col2|...|colN post:ForumID|col1|col2|...|colN topicForumID|col1|col2|...|colN Now I want to get table that would look like this:forum.ForumID|forum.col1|forum.col2|...|forum.colN|<topic count>|<post count> <post count> should be something like SELECT post.COUNT(*) WHERE forum.ForumID = post.ForumID and<topic count> should be something like SELECT topic.COUNT(*) WHERE forum.ForumID = topic.ForumID If anyone wants to know: topic has 1 or more posts, forum has 0 or more topics. So far I managed to come up with following: select forum.*,post.* FROM forum JOIN post WHERE forum.ForumID = post.ForumID But that's far from what I want. Does anyone know how I could achieve this?
-
Thanks.1 more question: if I use mysqli will my code still work with older SQL/PHP?
-
Thankyou. Is there function to get value $link parameter? I could use $link = mysqli_connect but then I would have to use global $link; in my function. Also what's the difference between mysql_*() and mysqli_*() functions? If I used mysql_connect then can I still use that link in mysqli functions?
-
what do you mean by that? I use mysql_query($update); where $update is string which's value is the following: UPDATE general SET Value='true' WHERE Setting='ALLOWBBCODE';UPDATE general SET Value='false' WHERE Setting='ALLOWSMILES';UPDATE general SET Value='0' WHERE Setting='LASTUPDATE';UPDATE general SET Value='0' WHERE Setting='MAXSIGNATURELEN';UPDATE general SET Value='' WHERE Setting='SITENAME';UPDATE general SET Value='Y/M/d H:i:s' WHERE Setting='TIMEFORMAT';UPDATE general SET Value='20' WHERE Setting='USERSPERPAGE';
-
hello If I do this: UPDATE general SET Value='true' WHERE Setting='ALLOWBBCODE';UPDATE general SET Value='false' WHERE Setting='ALLOWSMILES';UPDATE general SET Value='0' WHERE Setting='LASTUPDATE';UPDATE general SET Value='0' WHERE Setting='MAXSIGNATURELEN';UPDATE general SET Value='' WHERE Setting='SITENAME';UPDATE general SET Value='Y/M/d H:i:s' WHERE Setting='TIMEFORMAT';UPDATE general SET Value='20' WHERE Setting='USERSPERPAGE'; I get: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'UPDATE general SET Value='true' WHERE Setting='ALLOWSMILES';UPDATE general SET ' at line 2 If I pase this sql code to phpmyadmin I get this: UPDATE general SET Value='true' WHERE Setting='ALLOWBBCODE';# MySQL returned an empty result set (i.e. zero rows).UPDATE general SET Value='true' WHERE Setting='ALLOWSMILES';# 1 row affected.UPDATE general SET Value='0' WHERE Setting='LASTUPDATE';# MySQL returned an empty result set (i.e. zero rows).UPDATE general SET Value='0' WHERE Setting='MAXSIGNATURELEN';# MySQL returned an empty result set (i.e. zero rows).UPDATE general SET Value='' WHERE Setting='SITENAME';# MySQL returned an empty result set (i.e. zero rows).UPDATE general SET Value='Y/M/d H:i:s' WHERE Setting='TIMEFORMAT';# MySQL returned an empty result set (i.e. zero rows).UPDATE general SET Value='20' WHERE Setting='USERSPERPAGE';# MySQL returned an empty result set (i.e. zero rows). When I replace UPDATE general SET Value='' WHERE Setting='SITENAME'; ; with UPDATE general SET Value='abc' WHERE Setting='SITENAME'; then it says # 1 row affected. Also when I remove all other lines and leave only UPDATE general SET Value='' WHERE Setting='SITENAME' then it says # 1 row affected even if Value='' but if if I have SITENAME with empty value in long query like a one above then I get that empty result again. Does anyone know what is causing these errors and how I could fix these? I could use for loop in PHP but I would like to send it all as 1 query.
-
thanks again.
-
Thank you. Just one extra question. When that pruple div with "login" requires more height than parent div has it goes partially out of parent div. How do I make parent div auto resize for that inner div's height?
-
I am trying to place "login" div right of {TITLE}. but with code what I have it goes below that parent div as a separate block. With out float:right login goes below {TITLE}. Is there way to have it right of it? <div style="text-align: left; width: 100%; background-color: #99ccff"><h1>{TITLE}</h1><div style="float:right; text-align: left; background-color: #FF00ff">login</div></div> I want it be like this: http://www.w3schools.com/cssref/pr_class_float.asp where that translate and search box are right of w3c logo but still in same div.
-
Thank you boen_robot
-
From öäüõ it gets öäüõ which browser translates to öäüõ which isnt same anymore. I figured that correctl encoded string would be öäüõ Is there way to tell htmlentities not to touch characters such as öäüõ or other way around it?
-
Oh sorry, just created test function for that post to demonstrate how i want it to work. The solution was to set 3rd parameter of xmlhttp.open from true to false.
-
With current code I have to call test() 2 times before i get value. Is there way to make loadXMLDoc return response? or set value of ResponseText on first function call instead of 2nd one? I mean when I first call test() i see empty alert, but when I call it again then I have content returned by server. Is there way to get it on first call? var ResponseText = ''; function loadXMLDoc(){ var xmlhttp; if (window.XMLHttpRequest) {// code for IE7+, Firefox, Chrome, Opera, Safari xmlhttp=new XMLHttpRequest(); } else {// code for IE6, IE5 xmlhttp=new ActiveXObject("Microsoft.XMLHTTP"); } xmlhttp.onreadystatechange=function() { if (xmlhttp.readyState==4 && xmlhttp.status==200) { ResponseText = xmlhttp.responseText; } } xmlhttp.open("GET","acp.php?a=listusers",true); xmlhttp.send();} function test(){ alert(ResponseText);}
-
How to align "new row" to right top of table (pic inside)?
rain13 replied to rain13's topic in HTML/XHTML
So it's either impossible or no one here knows how to do it? -
Link http://www.kalkyl.co...AME/ame2006.txt or http://www.gofoundat...info/GO/str.sql or http://mehrl.com/Download/Wts/schema3_3_0_OneFibu.txt These aren't mysql files. I would like to know what are they and how I could view these as tables.
-
I am having problem with "new row" . I want it to be right top of table. Current problem is that it goes too far from table. I want it to be aligned so that it's right side would be as far as table's right side. I can't put it inside table because then I get border around "new row" too. I only want border to be around table. Here's image shows how i want that "button" to be placed: <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"><html><head> <meta content="text/html; charset=ISO-8859-1"http-equiv="content-type"> <title></title></head><body><div style="text-align: right;">new row<br></div><table style="text-align: left;" border="1" cellpadding="2" cellspacing="2"> <tbody> <tr> <td>a</td> <td>b</td> <td>c</td> </tr> <tr> <td>d</td> <td>e</td> <td>f</td> </tr> </tbody></table><br></body></html>
-
Mysql file is too large to manually edit (would take weeks if not moths to get everything unnecessary out of it manually). I would like to know if there is any software that would leave only these parts that are needed to import tables. I mean my sql file has sums and selects and other code for some reason. Probably not mysql file or something. And import ends with #1193 - Unknown system variable 'Variable name'.I would like to know if there is program to filter out only what's needed to import tables.