php

SQL report from 3 tables with SUM of fields

i have 3 tables see the picture i want the sql statement which produde report like Required Report in pic. ...

learning php,mysql,javascript,ajax for high paying jobs

I am very new to web development. For last few months I have noticed that, these days most of the high paying jobs are for .NET or J2EE only and not for PHP. Why is it so? Can learning php, MySQL, JavaScript, ajax, codeigniter help to earn high paying jobs like .NET or J2EE? I know that it is very argumentative topic, but I want to know ...

Magento - using Mage to edit a product?

I'm trying to integrate some functionality of Magento into my custom CMS to make it easier for my clients to update some of their products. I already have classes written to retrieve all the data information I need, but I'm trying to figure out how to save changes to a product in the same fashion (IE, attributes such as color, size, pac...

Testing with varying system ini settings

Ok, so here's the issue I've run into. On some of our production systems, we have magic quotes gpc enabled. There's nothing I can do about that. So, I've built my request data handing classes to compensate: protected static function clean($var) { if (get_magic_quotes_gpc()) { if (is_array($var)) { foreach ($v...

Wordpress: Don't show the first inserted post

So, I have some subcategories, and in each category I insert some posts, when I show the posts for each subcategory I don't want to show the FIRST inserted post in that subcategory, only the posts that are not the FIRST ONE.How can I do this with query_posts..or how? Best Regards //SOLVED I will use a custom field ...

Piwi PHP Transformation Framework - Scaling and Performance?

I recently inherited a simple PHP application built on Piwi (http://www.piwiframework.de/default.html). Has anyone deployed this framework in a high-availability high-concurrency scenario? I was thinking about 5000 concurrent users (at least) with a 2-3 hour burst totaling about 15-50k unique sessions. I'm not asking if php can be scal...

Best editor/IDE(?) for Javascript / PHP development

Possible Duplicate: Better PHP,MySql,HTML and JavaScript IDE I'm primarily a C#.NET developer, and dabble with VB.NET when I need to for dealing with older applications within the organisation. I have been doing more work with PHP and Javascript lately, mainly in the domain of Wordpress. I think Visual Studio is a great IDE,...

Action not found in controller. Using Zend framework but action IS there.

I have a controller called Account and an action called logout. It's pretty simple: <?php class AccountController extends CustomControllerAction { public function logoutAction() { Zend_Auth::getInstance()->clearIdentity(); $this->_redirect('/account/login'); } But for some reason I'm getting a ...

PYTHONPATH and PHP

I have a PHP script that call a python script (someone else I can't edit). This work fine on CLI but once I run it as CGI it fails with the error "bzr: ERROR: Couldn't import bzrlib and dependencies." I guessed it has anything to do with PYTHONPATH so I echo it out and found that it was empty when in apache environment. I try setting i...

Some advice for if I should even bother eliminating Notice errors in Joomla

I changed the option in the Joomla configuration section to show all errors (E_ALL) and my component is basically unusable. As an example, in a view (editapp) I have a template, default.php, which contains things like: <input class="text_area" type="text" name="application_name" id="application_name" size="50" maxlength="250" value...

preg_match expression help

Can't seem to figure this one out. Just trying to preg match for a specific variable name in a link URL: <a href="http://something.com?variable=name"&gt;GenericLink&lt;/a&gt; How do I get the variable=name out of this? Thanks! ...

Joining more than two mysql tables then manipulating rows into grouped multidimensional arrays

I'm trying to join multiple myqsl tables and then process resulting arrays using PHP but I'm having problems manipulating my data to get the groupings I'd like. table.users +--------------- uidname table.profile_values +----------------------- fiduidcategory_value table.profile_fields +--------------------- fid catego...

JSON specialchars JSON php 5.2.13

I'm getting crazy over these encoding probs... I use json_decode and json_encode to store and retrieve data. What I did find out is, that json always needs utf-8. No problem there. I give json 'hellö' in utf-8, in my DB it looks like hellu00f6. Ok, codepoint. But when I use json_decode, it won't decode the codepoint back, so I still hav...

Wordpress post thumbnails

Is there a way to stop wordpress resizing images? I already have in the functions.php add_theme_support( 'post-thumbnails' ); set_post_thumbnail_size( 235, 419 ); add_image_size( 'single-post-thumbnail', 235, 419 ); Still doesn't work, when I upload a post thumbnail resizes it to some crazy sizes which I don't want..Any way to get th...

case insensitive xpath searching in php

I have an xml file like this: <volume name="Early"> <book name="School Years"> <chapter number="1"> <line number="1">Here's the first line with Chicago in it.</line> <line number="2">Here's a line that talks about Atlanta</line> <line number="3">Here's a line that says chicagogo </line> </chapter> </book> </volume> I'm trying to do a ...

substitute for php rawurlencode in asp.net??

Hello , I have a php running code to send mms but when i converted whole code into asp.net i didnt get any substitute for rawurlencode in asp.net. i m searching this fromlast two days for nothing is working plz help me out from this problem. Thanks in advance. ...

text area like FCK editor

I would like to develop a html editor just like FCKeditor, but i dont know how they display the html code in text area like region, Will U pls help me with that? for having that textarea, which prase html codes and displays just like a web page? ...

PHP Memcache Key Expire

I am not sure if this is possible. I was storing some information in a memcache server. The memcache entry i was storing was suppossed to have an expiry of 30 minutes. During that 30 minutes i could update the value of that memcache entry reference by the same key. But when i update the value i do not want to change the expire time. For ...

PHP: less ugly syntax for named parameters / arrays?

Here's what I am trying to accomplish: function foo($args) { switch($args['type']) { case 'bar': bar($args['data']); // do something break; } } // or something like that Which is basically a way of using named parameters in PHP. Now, in order to build this $args array, I am forced to write ugly syntax like: $builtArgs = a...

Methods of a "belongs to" and "has many" relationships

Let's say that I have two tables in my database: users countries I have two defined relationships on each user belongsTo a country and each country hasMany users.. (CakePHP model relationships) And I want to crate the model findUsersFromCountry($countryID) in wich class/model this method will be? It must be inside the User model or t...