eZACKe's Profile User Rating: -----

Reputation: 120 Stalwart
Group:
Active Members
Active Posts:
1,275 (0.88 per day)
Joined:
01-June 09
Profile Views:
28,046
Last Active:
User is offline Aug 20 2012 11:17 AM
Currently:
Offline

Previous Fields

Country:
US
OS Preference:
Windows
Favorite Browser:
Chrome
Favorite Processor:
AMD
Favorite Gaming Platform:
XBox
Your Car:
Who Cares
Dream Kudos:
0

Latest Visitors

Icon   eZACKe “Always code as if the guy who ends up maintaining your code will be a violent psychopath who knows where you live.”

Posts I've Made

  1. In Topic: .htaccess mod_rewrite causing $_POST to not go through

    Posted 10 Jul 2012

    I'm not sure I understand your question or your concern. Could you please elaborate? Thank you.
  2. In Topic: Mod Rewrite for variable sized urls

    Posted 11 Jun 2012

    In all honesty, it really is to make it "pretty" for the human users. Maybe not even so much the human users, but myself. I just like nice looking urls.
  3. In Topic: Mod Rewrite for variable sized urls

    Posted 11 Jun 2012

    After rereading this and thinking more about what I'm asking, I realize what I'm requesting my actually be imposisble.

    But what about this: Can you keep like a counter in mod_rewrite

    So I could always convert something like this:
    www.example.com/myCmd/myAction/114/118/SOME_NAME....

    To

    www.example.com/?cmd=myCmd&act=myAction&tmp1=114&tmp2=118&tmp3=SOME_NAME.....&tempx=...
  4. In Topic: mysql query question

    Posted 11 Jun 2012

    That query will, as you said, query the person table and retrieve the first_name and last_name fields. Everything after WHERE in an SQL statement is considered the WHERE Clause. In this specific WHERE Clause, you're using the id field to narrow down your search in the db table.

    In this example, $inAuthorId was probably already set to something, most likely a number, but doesn't have to be. Now in the mysql_query function, you're concatenating the first part of the query and this variable. So if the variable's value was 2 your query would look like:

    SELECT first_name, last_name FROM people WHERE id = 2

    So this query will return the first_name and last_name of the row in the people table which has id equal to 2.

    If I were doing this in PDO it'd look something like:


    $sql = "SELECT first_name, last_name FROM people WHERE id = :theId";
    		$result = self::$pdo->prepare($sql);
    		$params = array(
    			'theId' => $inAuthorId
    		);
    		$result->execute($params); 
    		$result->bindColumn('first_name', $firstName);
    $result->bindColumn('last_name', $lastName);
    		$result->fetch(\PDO::FETCH_BOUND);
    
    


    For more info on PDO: http://php.net/manual/en/book.pdo.php
  5. In Topic: My Framework and MVC.. am I doing it right?

    Posted 10 Jun 2012

    View Poste_i_pi, on 10 June 2012 - 06:06 PM, said:

    But, in terms of having a class that represents a DB table, I personally don't see this as a good pattern. Basic functions for table interaction can be made generic, and so are not reliant on the table itself. Interaction with a DB necessitates unique classes when the relational model itself becomes unique. Let's say, for example, you have a DB schema where there is a table Employees, a table Positions, and a table Departments. If you want to get the following information:


    Oh, and about this: Well, what I meant was my Domain Objects have properties for like DB fields. Like a Member Domain Object would have dateStarted, displayName, address, etc. But they are not just glorified data holders. They have methods that may even use other Domain Objects to get data.

My Information

Member Title:
Garbage Collector
Age:
23 years old
Birthday:
February 14, 1990
Gender:
Location:
New York
Interests:
TRACK, computer science, video games
Years Programming:
4
Programming Languages:
Learning: Java, C#, PHP, MySQL, HTML/CSS, Flex

Contact Information

E-mail:
Private
AIM:
AIM  zrunn3rz
Website URL:
Website URL  http://
Facebook:
http://www.facebook.com/zhine

Comments

Page 1 of 1
  1. Photo

    Guest 

    17 Jul 2011 - 22:13
    Hey there, I was just curious if you would check out my programming forum. If your active and interested, you may become a moderator early on. We are a new forum, powered by IPB... check us out!
    http://www.theprogrammingforum.com
  2. Photo

    diffsoft Icon

    16 Feb 2011 - 22:13
    Hi how are you.I am adding you as friend.
    Now, what your response about me.Give me tips
    related to c#.
  3. Photo

    caleb123 Icon

    22 Jun 2010 - 19:44
    Would you like to be my website designing buddy? If you do, you can email me at cheryman22@yahoo.com
    You and I can give each other tips and answer question to make us both better at designing websites.
Page 1 of 1