php

Mysql Query doubt

I have three tables namely test1, test2, test3 test1 data =========== id test_id q_id 1 25 2 2 27 2 test2 data =========== id test_id q_id 1 25 2 2 34 2 test3 data =========== id test_id q_id 1 34 2 how get test_id value with q_id = 2 from these three tables without repeating data ? that ...

Javascript error while executing alert function through php

Hi, I am using fusion maps in one of my application. In one of the example i have to pass the value from one map to another charts, I am facing one problem if the data passed is numeric its displaying alert message correctly but if it is a string it generates an error: NM is not defined javascript:alert(NM)() My code is as below: ...

Change the whole content of site depending on monitor resolution

In my site I am applying a stylesheet depending upon the resolution of the viewer's monitor. By using screen.width in javascript i do this. But now I have a doubt that can I use the same technique to change the whole content of the site depending upon the resolution, i.e, for higher resolutions more contents and for lesser, fewer. Or you...

Why is Zend Framework so popular?

I'm not a troll and my goal isn't to start a flame war; neither do I mean to disrespect the authors of the Zend Framework: there is a lot of fine work in it. But... I have a job to get done and I'm having a hard time reconciling the popularity of ZF against the reality of building apps with it. I would really like to know from others why...

Can I change the compression level of ZipArchive?

Is it possible to change the compression level and/or method used by the ZipArchive class? ...

When in optimization phase, would it be smart to pass all array by ref?

In PHP, When we get to the optimization phase of the application (I am speaking about an app that handles hundreds of thousands of users) would it be smart to pass all arrays (where I do not mind what happens to them after I pass them to the function) by ref? ...

Calling subclass's function from superclass based on string in PHP

How would I do something like this: <?php class Controller { var $ActionName; var $PageParameters; function InvokeAction() { $actionFunctionName = ucfirst($this->ActionName); // Call a function named $actionFunctionName // where $actionFunctionName is in a subclass } } ...

How to get PHP $_GET array ?

Hello, I have a question. Is it possible to have a value in $_GET as an array? If I am trying to send a link with http://link/foo.php?id=1&amp;id=2&amp;id=3, and I want to use $_GET['id'] on the php side, how can that value be an array? Because right now echo $_GET['id'] is returning 3. Its the last id which is in the header link. Any ...

PHP Email Array Regular Expression

Given a list of emails, formated: "FirstName Last" <[email protected]>, "NewFirst NewLast" <[email protected]> How can I build this into a string array of Only email addresses (I don't need the names). ...

Creating a "guide bar" like this, above a web page by php+mysql?

I want to create a "guide bar" (I don't know its right name). I've got a table called cat that has the following data: catid catname parentid 1 news null 2 sport 1 3 health 1 4 tennis 2 5 football 2 6 soccer ...

What is the best to learn next to aply extra functionality to CMS templates

I've learned CSS and HTML, what should I learn next if my goal is to create templates for joomla and worpress? ajax? php? js? I poked around and haven't found a question that is alike so I posted this one thank you in advance! ...

Remove empty subfolders with PHP

I am working on a PHP function that will recursively remove all sub-folders that contain no files starting from a given absolute path. Here is the code developed so far: function RemoveEmptySubFolders($starting_from_path) { // Returns true if the folder contains no files function IsEmptyFolder($folder) { return (count(...

MySQL Database; best schema

I have a question about a database schema for a certain website where people can sell and buy stuff. When someone adds an ad to the database, he will choose the category and fills out the filters that belong to the selected category, so anyone can easily find his ad by browsing to a category and choosing filters like: [bluetooth] ye...

how to pass variables inside one page

Hello, I want to know how to pass variables from a form to a php page. Thanks. Edit: I have some input and a submit button in a form. I want my php page to search the database and display a relevant table after I click the submit button. And all the actions here are in one page. So I want to know how to pass variables from a form...

Help to convert this PHP code to VB.NET code

Hi I have a code to send XML via POST. But this code is in PHP and I need it in VB.NET. Any help to convert this code? $XMLFile= (here i have created the xml file. XML is encoded ISO-8859) $ch = curl_init(); curl_setopt($ch, CURLOPT_URL,"URL WHERE I SEND XML"); curl_setopt($ch, CURLOPT_POST, 1); curl_setopt($ch,CURLOPT_RETURNTRANSFER...

Zend Framework - shared view script path ( global partials )

How is it possible to set up a shared view script path for partials to create global partials within the Zend Framework? We know that you can call partials between modules e.g - echo $this->partial('partial_title','module_name'); but we need to set up a partial folder in the root ( i.e below modules) so that it can be access...

How to benchmark php/mysql site

I would like to know how to benchmark a php/mysql site. We have a web app almost completed and ready to go live, we know how many people are going to be using it in a years time but have absolutely no idea how much bandwidth the average user takes, to how much time they burn up on the database etc. We need to determine the correct serve...

How do I format an amount of milliseconds into minutes:seconds:milliseconds in PHP?

I have a total ammount of milliseconds (ie 70370) and I want to display it as minutes:seconds:milliseconds ie 00:00:0000. How can I do this in PHP? ...

regular expression - how to match an empty string

i want to match a string that can have any type of whitespace chars (specifically I am using PHP). or any way to tell if a string is empty or just has whitespace will also help! ...

DECIMAL vs INT what is the best optimized choice?

I'm sure this ask in incomplete without a precise context, so I'll try to explain it, and I'll try to be clear I need to store a whole of data rapresented on the page with grams, milligrams, micrograms and kilojoule. All of this data is like 99999.99g (kilojoule apart), so I could use DECIMAL(7,2) or DECIMAL(5,2) with older MySql versio...