- Upvotes Received
- 1
- Posts with Upvotes
- 1
- Upvoting Members
- 1
- Downvotes Received
- 0
- Posts with Downvotes
- 0
- Downvoting Members
- 0
I have a PostMapper class like the one in http://www.sitepoint.com/integrating-the-data-mappers/ But, I modified the find method, so it can have more parameters (I want to paginate the data, so I added the limit parameter) public function find(array $columns = array('*'), array $where = array(), $offset=0, $limit=5, $orderBy=null) { $sql = … |
|
What does PDO::query actually do ? Does it query the SQL ? If it queries the SQL, I think the data must be in the PDOStatement object as the result of the query.. But, what I find is just the SQL statement itself. So, I think it does nothing but … |
|
Is it good to declare a class with many methods ? Or, is it better to use flags ? Which one performs faster ? Example class Filter { public function filterspecialchar($input){;} public function filterurl($input){;} public function filteremail($input){;} } class Filter { CONST SPECIALCHAR = 1; CONST URL = 2; CONST … |
|
I want to make a semantic bulletin board. But, I don't know whether the <section> tag should be used for a category and a forum or not.. And, I also wonder if there is something better if I use <article> tag for the first forum post (the article that is … |
|
I have a custom error-handler class (actually it's an exception handler) So, when an exception is thrown, then it'll be caught and stored in the error-handler class.. After all the execution, All the errors will be shown by the class.. Is it a good or bad practice ? Does it … |
|
Can you tell me what's the right way to benchmark script ? I've profilled it by using Xdebug, but the result always changes And, when i use memory_get_usage, it gives me a definite result.. But, is it right for me to say that the less memory it use, the faster … |
|
First, i'd like to show you my directories --themes -- images -img1.jpg -index.php -index.php My index.php (root) : <?php require_once '/themes/index.php'; ?> And, the index.php in the template : <!DOCTYPE html> <html> <head> <title>Test</title> </head> <body> <img src="images/img1.jpg"> </body> </html> I think it will load themes>>images>>img1.jpg But, it loads images>>img1.jpg … |
|
I wonder how CMS(Wordpress) know the default template and plugins to run. Should I store the default value for template in MySQL database or just using file_put_content to store the default value for template/plugins ? Or, is there any better way ? |
|
Look at my table design below. It is a table that shows the roles of users. CREATE TABLE `userrole` ( `userid` bigint(20) unsigned NOT NULL, `roleid` int(10) unsigned NOT NULL, PRIMARY KEY (`userid`,`roleid`), KEY `fk_userrole_roleid` (`roleid`), CONSTRAINT `fk_userrole_userid` FOREIGN KEY (`userid`) REFERENCES `user` (`user_id`) ON DELETE CASCADE ON UPDATE CASCADE, … |
|
This is my query : CREATE TABLE userrole ( userid BIGINT NOT NULL, roleid INT NOT NULL, PRIMARY KEY(userid,roleid), CONSTRAINT fk_userid FOREIGN KEY (userid) REFERENCES user(user_id) ON DELETE CASCADE ON UPDATE CASCADE, CONSTRAINT fk_roleid FOREIGN KEY (roleid) REFERENCES role(role_id) ON DELETE CASCADE ON UPDATE CASCADE ) So, what i want … |
|
Please tell me the best way to hash password in CMS.. I've seen Crackstation's hashing : https://crackstation.net/hashing-security.htm And phpass : http://www.openwall.com/phpass/ Please tell me which one is the best or tell me if there is another good hash method for password.. |
|
First, look at my site : http://terryds.net63.net/test.html When you hover the navigation anchor text, it will create a 5px border-top.. My question is : 1. How to make the 5px border top is at the top of the page ? I mean I want to make it in #top-head's border … |
|
Hi Would you please tell me how to make same-height responsive block elements that stand side-by-side ? Please look at http://jsfiddle.net/terryds/v7BYy/ , and then please tell me how to make the #left-head the same height with #right-head. And, I want them to be responsive as you scale it down Thanks … |
|
How to make a clickable list item with anchor text inside ? For example <li class="clickable"> <a href="http://www.somesite.com">Go</a> </li> So, when i click the list item, the browser should automatically go to www.somesite.com ... In other words, I want to make it like the snippets on CSS Tricks : http://css-tricks.com/snippets/ |
|
Re:
please follow this link and help me https://drive.google.com/file/d/0B6V-9RLYdFzeVUVQdzJyNnd1MEk/edit?usp=sharing visit html file and help regarding this proble |
|
Here is the fiddle : http://jsfiddle.net/terryds/2QNK3/ The problem is the black bar at the top of the page... It should have 5px margin-bottom.. But, it doesn't... Please help me fix it... |
|
Hello, I am new here... I am learning web designing and web programming... I'm from Indonesia, so i'm sorry if my English is not excellent.... I hope we can learn together and share our knowledge here.. Thanks :) |
|
First, here are my code HTML <!DOCTYPE html> <html> <head> <link type="text/css" rel="stylesheet" href="css/style_v2.css"> <title>Far Far Away - A folktale at Faraway Island</title> </head> <body> <header> <div id="logonslogan"> <a href="#">Well-Designed Blog</a> <p id="slogan">Created by Terry</p> </div> <div id="navnsearch"> <nav> <ul> <li><a href="#">Home</a></li> <li><a href="#">Portfolio</a> <ul> <li><a href="#">Wordpress Theme</a></li> <li><a href="#">Blogger … |
|
First, take a look at my code <?php try { $dbh = new PDO('mysql:host=$db_host;dbname=blogproject1','root',''); $dbh->setAttribute(PDO::ATTR_ERRMODE,PDO::ERRMODE_EXCEPTION); $dbh->exec('SET NAMES "utf8"'); } catch (PDOException $e) { die('Error: ' . $e->getMessage()); } if(!defined('GUEST')) { define('BASEPATH', dirname(dirname(__FILE__)); header('Location: ' . BASEPATH); exit(); } When it executed it gives me an error.. Looks like, the error … |