Posts
 
Reputation
Joined
Last Seen
0 Reputation Points
100% Quality Score
Upvotes Received
1
Posts with Upvotes
1
Upvoting Members
1
Downvotes Received
0
Posts with Downvotes
0
Downvoting Members
0
~3K People Reached
Favorite Tags
Member Avatar for terryds

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 = …

0
77
Member Avatar for terryds

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 …

Member Avatar for cereal
1
225
Member Avatar for terryds

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 …

Member Avatar for diafol
0
111
Member Avatar for terryds

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 …

Member Avatar for tdrosiadis
0
162
Member Avatar for terryds

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 …

Member Avatar for matrixdevuk
0
175
Member Avatar for terryds

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 …

0
68
Member Avatar for terryds

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 …

Member Avatar for gabrielcastillo
0
213
Member Avatar for terryds

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 ?

Member Avatar for veedeoo
0
110
Member Avatar for terryds

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, …

Member Avatar for Taywin
0
230
Member Avatar for terryds

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 …

Member Avatar for cereal
0
265
Member Avatar for terryds

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..

Member Avatar for Taywin
0
183
Member Avatar for terryds

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 …

Member Avatar for Alberto Bucur
0
90
Member Avatar for terryds

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 …

Member Avatar for terryds
0
104
Member Avatar for terryds

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/

Member Avatar for pixelsoul
0
111
Member Avatar for sweet.virat

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

Member Avatar for sweet.virat
0
142
Member Avatar for terryds

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...

Member Avatar for terryds
0
139
Member Avatar for terryds

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 :)

Member Avatar for JorgeM
0
49
Member Avatar for terryds

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 …

Member Avatar for EvolutionFallen
0
214
Member Avatar for terryds

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 …

Member Avatar for code_rum
0
160