I have the following MySQL query:
SELECT SQL_CALC_FOUND_ROWS p.*
FROM product AS p
LEFT JOIN productCategory AS c ON FIND_IN_SET(c.id, REPLACE(TRIM(p.categories), ' ',','))
WHERE (
c.id IS NULL
OR c.status = 'D'
OR p.categories IS NULL
OR TRIM(p.categories) = ''
)
AND p.deprecated = 'N'
LIMIT 0,30
This query is to pick...
I have an iphone app that sends and retrieves data from a php script.
I would like to connect to that script once, save some data into a $_SESSION variable.
Then on subsequent calls be able to retrieve the content of that $_SESSION vars.
Is this possible?
Thanks
...
Hello All,
I want to execute a php script after every one minute in background on windows OS, for this purpose i am using windows task scheduler in which i am giving the path of a php file after choosing Internet Explorer EXE, it works fine and after every minute opens that page in browser window and performs my wanted task.
Now the iss...
I have a PHP form with an optional file input. If no file is chosen, and I do print_r($_FILES) after submission, I get this:
Array ( [the_file] => Array (
[name] => [type] => [tmp_name] => [error] => 4 [size] => 0 )
)
On forms with no file input, the $_FILES array is just empty, which is what I would prefer to happen if the optiona...
I have read quite a bit of material on Internet, where different authors suggest using output buffering. The funny thing is that most authors argument for its use because it allows to set HTTP response headers while also generating response output. Frankly, if for no other reason, I think that responsible web applications SHOULD NOT mix ...
Hello,
For a scheduling system, what's the best way to save the timezone of client/event in a central server database coming from multiple sources mobile,web,client app.
How do you store the dates? Alarms, reminders etc...
How do you handle the DST setting?
How do you handle the events if client has traveled to a different locat...
Hello,
How to mimic C++ template classes in PHP?
EDITED1
For example how would this be in PHP?
template <typename T>
class MyQueue
{
std::vector<T> data;
public:
void Add(T const &d);
void Remove();
void Print();
};
...
I have a simple array in PHP, say
[1, 2, 4, 5, 6, 7]
and I wish to query a MYSQL database
[1, who]
[2, where]
[3, some]
[6, there]
[9, too]
I only wish to receive the rows of intersection between the PHP array and the database's indices column. So this would result in
[1, who]
[2, where]
[6, there]
Any ideas? Thanks!
...
Part of a site I am building uses a javascript ajax request to hit a PHP script that retrieves, parses, sorts and paginates and returns results from an XML file. I have done this in a pretty straight forward fashion on the PHP side with variables POST variables being retrieved, sanitized and reassigned, SimpleXML loading the file and usi...
Do any body know how to use bespin php backend? mean how can i use it , i want to edit php files like an online php code editor.http://launchpad.net/bespinphp here is the url!!
...
I am using Apache 2.2.6 with suPHP 0.6.2 and PHP 5.2.6 and I am trying to use an Alias in order to route all requests on a certain URL trough a PHP script. I want all requests to /test to go through index.php. In the Apache virtualhost config I have set up an Alias Alias /test /index.php. index.php is just a dummy script containing the f...
I have a generic include that contains secondary navigation, etc. that is included on every page of a site. It also contains a graphic that I want to appear on every page but the home page. I realize that it would be trivial to do this client side and just remove the node from the DOM on load on that one page, but for various reasons I w...
I have two input box:
<input name="adrs" id="adrs" type="text">
<input name="city" id="city" type="text">
Now I want when user write this, is there any way by which i can tell the user that given address is not on google map? Any simple method , I am using EasyGoogleMap.class.php class. Please suggest me any jquery method to show t...
I have a Template Parser function which loads the raw html code of the template with the given name and replaces wildcards in it (%DATE%,etc). I will be using the same template more than once for some pages, e.g. a menu item, and so the html file would be loaded into memory more than once.
So one file would be read more than once becaus...
I am currently implementing a registration form and doing the username availability checking using jquery and php.
In this case where the user_availability.php is in same folder as the registration from, it is easy to specify like the following to retrieve the function in the page.
$.post("user_availability.php",{ user_name:$(this).val...
Hi, i have been trying to find some examples on how to generate DigestValue and SignatureValue for XML signature (WSDL).
Below is a sample SOAP for the application:
<?xml version="1.0" encoding="UTF-8"?>
<soapenv:Envelope xmlns:SOAP-SEC="http://schemas.xmlsoap.org/soap/security/2000-12" xmlns:soapenv="http://schemas.xmlsoap.org/soap/en...
Embedded via iWeb because I decided to mock it up quickly.
The buttons and/or functions are not responding at all: http://nomosolo.com/preview/Word_On_The_Street.html
Any thoughts?
...
I have two associative array which have many content same and so I want to combine those two arrays in such a way that if I have a in array 1 and a in array 2 than in array 3 I should have entries for both a's and not 1.
I have tried using array_merge but it would overwrite entries in 1st array if there are any duplicates in 2nd array, ...
My file upload routine first checks to make sure the user is logged in to the wordpress application which is hosting the upload form...CHECK!
Here is the code at the top of my uploader utility that does this...
if (!is_user_logged_in()){
die("You Must Be Logged In to Access This");;
}
So far so good. Now I'm seeking to further se...
Hello,
I'm just putting together a little 'hello world' type plugin to add a widget to the dashboard. The plugin is initialising and everything is fine with that i'm just having a problem adding content to the widget. Here's the code:
/*
* Setup the class
*/
if(!class_exists("SampleClassSeries")){
class SampleClassSeries {
...