Jump to content

Philip

Staff Alumni
  • Posts

    4,665
  • Joined

  • Last visited

  • Days Won

    20

Everything posted by Philip

  1. Oh man, that sounds about right
  2. Nothing has changed, you were just blinded by the amount of idiots bad posts before... and now you see the tidal wave of them all
  3. If you're using MySQL administrator for both local & server, the best way to do it (that I've found) Create a new project in "Backups", select the schema & tables. That'll create an export, then login with the server credentials and go to "Restore" and find the saved file.
  4. If only they would... sigh...
  5. $news=mysql_query("SELECT wp_posts.*, wp_term_relationships.term_taxonomy_id FROM wp_posts, wp_term_relationships WHERE wp_posts.post_type = "post" AND wp_posts.post_status = "publish" AND wp_term_relationships.object_id = wp_posts.ID AND wp_term_relationships.term_taxonomy_id = 4 ORDER BY wp_posts.post_date DESC"); Tell me what is wrong with that
  6. If you just want the sum, and not data from each row: SELECT SUM(qty * price) as total FROM table WHERE id = 10354
  7. I'm not sure what you want to add... all of the multiplication products? here's for multiplying: SELECT (qty * price) as total FROM table WHERE id = 10354 You can use SUM to get the total.... but I'd do that in PHP
  8. I'd use mysqli and extend the class. Setup a new method overloading the query method, and each time you run the query save the query string to an array. Create another that returns the array. Quick example (untested): class MySQLiX extends mysqli { private static $queries = array(); function query($query) { self::$queries[] = $query; return parent::query($query); } function getQueries( ) { return self::$queries; } } // use: $db = new MySQLiX('host','user', 'pass', 'world'); $db->query('SELECT * FROM table WHERE 1'); $db->query("DELETE FROM table WHERE col = 'val'"); print_r($db->getQueries());
  9. Like all the queries you ran, number of queries, or the results from all of them?
  10. I thought Opera had flash on its mobile browsers? I guess not mini, but just normal mobile? Anywho. http://www.google.com/mobile/products/youtube.html#p=default
  11. Youtube uses flash, so I'd look at some flash mp3 players.
  12. How is the response different? Is the text different, header code (redirect), or what?
  13. As Maq said, this is a pretty difficult question. When using a minimalistic approach, your choices in images & typography play a much much much bigger role. Here are 2 articles on it: http://vandelaydesign.com/blog/design/how-to-make-minimalistic-design/ http://www.smashingmagazine.com/2008/11/17/showcase-of-minimalist-and-clean-designs/
  14. What does your current select statement look like? Processing it on the db side is typically more efficient
  15. http://www.phpfreaks.com/forums/index.php/topic,117475.0.html I like site5, they've been pretty good for me.
  16. Then make it dynamic by using $_SERVER['HTTP_HOST'] Try running this simple script: <?php echo 'My domain is: '.$_SERVER['HTTP_HOST']; ?>
  17. Just do: <link href="styles.css" rel="stylesheet" type="text/css" />
  18. That's technically invalid for a header, but only because of HTTP specs. From the manual: header
  19. Or if you don't want to convert it over: $var = 56781236; $int = (int) (($var%10000)/1000); // $int = 1 Please note that if your var isn't big enough it will just show 0... and doing it as a string[ ] will produce undefined index (I believe) You should check to make sure your value is big enough before applying any of these techniques.
  20. Not always. You can setup apache to parse .html as a .php
  21. /all-games/pacman/index.html?game=pacman isn't that kind of redundant? And I'm confused to what this topic is trying to accomplish?
  22. Ahh okay I see the problem now, it's with scope. function get_form(){ $wpform = new wp_form; //problem is here vvvvvvvv $this->wpform = $this->wpform->get_wp_form($this->method, $this->action, $this->wptable); } $wpform's scope is local to that function, where as $this->wpform's scope is the class It should read: function get_form(){ $this->wpform = new wp_form; //problem is here vvvvvvvv $this->wpform = $this->wpform->get_wp_form($this->method, $this->action, $this->wptable); }
  23. Okay, so whats the exact error you are getting?
  24. What about $new_wp? $new_wp->set_method($m);
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.