Philip
Staff Alumni-
Posts
4,665 -
Joined
-
Last visited
-
Days Won
20
Everything posted by Philip
-
Oh man, that sounds about right
-
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
-
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.
-
If only they would... sigh...
-
Parse error: syntax error, unexpected T_STRING
Philip replied to sterlingevans's topic in PHP Coding Help
$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 -
If you just want the sum, and not data from each row: SELECT SUM(qty * price) as total FROM table WHERE id = 10354
-
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
-
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());
-
Like all the queries you ran, number of queries, or the results from all of them?
-
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
-
Youtube uses flash, so I'd look at some flash mp3 players.
-
How is the response different? Is the text different, header code (redirect), or what?
-
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/
-
What does your current select statement look like? Processing it on the db side is typically more efficient
-
http://www.phpfreaks.com/forums/index.php/topic,117475.0.html I like site5, they've been pretty good for me.
-
Then make it dynamic by using $_SERVER['HTTP_HOST'] Try running this simple script: <?php echo 'My domain is: '.$_SERVER['HTTP_HOST']; ?>
-
Just do: <link href="styles.css" rel="stylesheet" type="text/css" />
-
That's technically invalid for a header, but only because of HTTP specs. From the manual: header
-
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.
-
Not always. You can setup apache to parse .html as a .php
-
/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?
-
-
[SOLVED] Fatal error: Call to member function on...non-object...
Philip replied to venturemc's topic in PHP Coding Help
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); } -
[SOLVED] Fatal error: Call to member function on...non-object...
Philip replied to venturemc's topic in PHP Coding Help
Okay, so whats the exact error you are getting? -
[SOLVED] Fatal error: Call to member function on...non-object...
Philip replied to venturemc's topic in PHP Coding Help
What about $new_wp? $new_wp->set_method($m);