Reputation: 120 Stalwart
- Active Members
- Active Posts:
- 1,277 (0.72 per day)
- 01-June 09
- Profile Views:
- Last Active:
- Jan 25 2014 10:01 PM
- OS Preference:
- Favorite Browser:
- Favorite Processor:
- Favorite Gaming Platform:
- Your Car:
- Who Cares
- Dream Kudos:
Posts I've Made
Posted 22 Jan 2014lossless = less compression. You want to send them via jpeg and even downsize resolution. People are viewing these on small screens. Don't worry so much about quality.
Any recommendations on what to pass in for the quality to compress? If I keep it JPG, but also pass in 100 to the compressor would that be a good strategy? Or is it more of a just trial and error thing? Thanks for the reply btw.
Posted 10 Jul 2012I'm not sure I understand your question or your concern. Could you please elaborate? Thank you.
Posted 11 Jun 2012In 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.
Posted 11 Jun 2012After 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:
Posted 11 Jun 2012That 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
- Member Title:
- Garbage Collector
- 24 years old
- February 14, 1990
- New York
- TRACK, computer science, video games
- Years Programming:
- Programming Languages:
- Learning: Java, C#, PHP, MySQL, HTML/CSS, Flex