eZACKe's Profile
Reputation: 120
Stalwart
- Group:
- Active Members
- Active Posts:
- 1,275 (0.88 per day)
- Joined:
- 01-June 09
- Profile Views:
- 28,046
- Last Active:
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
Posts I've Made
-
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. -
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. -
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=... -
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 -
In Topic: My Framework and MVC.. am I doing it right?
Posted 10 Jun 2012
e_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
|
|


Find Topics
Find Posts
View Reputation Given





|
Comments
Guest
17 Jul 2011 - 22:13http://www.theprogrammingforum.com
diffsoft
16 Feb 2011 - 22:13Now, what your response about me.Give me tips
related to c#.
caleb123
22 Jun 2010 - 19:44You and I can give each other tips and answer question to make us both better at designing websites.