php

MySQL: How to add one day to datetime field in query

Hello, In my table I have a field named eventdate in datetime format like 2010-05-11 00:00:00. How do i make a query so that it adds one day to the eventdate eg if today is 2010-05-11, i want to show in where clause to return all records with tomorrow's date. Update: I tried this: select * from fab_scheduler where custid = 133466605...

PHP (images folder) image Listing in Alphabetical Order?

Hello, I'm having problems with a PHP script trying to list images alphabetically. I need this urgently and I have not much knowledge of PHP. I was trying to use scandir() but I'm not succeeding. Thanks for your help!! Here is the code: function listerImages($repertoire){ $i = 0; $repertoireCourant = opendir('./'.$repertoire); whi...

Can I redirect/alias one web service call to another?

I've written a simple PHP nusoap web service for an application and wish to change the name of one of the actions so that it makes more sense. However there is a CD-ROM based application in the wild using this web service and this action and so I need to redirect or alias any incoming requests to the new action... any idea how I might go...

mysql IF EXISTS

I have this table UMS id_attribute value order 1 MB 1 1 Gb 2 1 TB 3 ... and this table ATTRIBUTE_VALUE id id_attribute value name ums 1 1 50 hdd GB 2 1 100 hdd TB 3 2 ...

How to create a chart from mysql data? (using Google visualisation api)

Hello, I have some data and want to create some dynamic charts. I have looked on Google visualisation api .. It looks great but the problem is I am not very familiar with it. Any ideas, how I can set the data.setValue from mysql data. <script type='text/javascript'> google.load('visualization', '1', {'packages': ['geomap']}); ...

Any array function or user defined function to pick up only first occurence of value from the array?

EDITED I m using this select query with left join: $updaterbk = "SELECT j1. * FROM jos_audittrail j1 LEFT OUTER JOIN jos_audittrail j2 ON ( j1.trackid != j2.trackid AND j1.field != j2.field AND j1.changedone < j2.changedone ) WHERE j1.operation = 'UPDATE' AND j2.id IS NULL "; which outputs me an array: Array ( [0] => Array ...

RSS Subsriber count without using feedburner

Currently, I have a blog which is running on wordpress. I want to know how many users subscribe my feeds. I know that if i used feedburner, I can get the counter from there. But I was really wondering if there's anyway that we can track the subscriber easily. Please kindly share the code or ideas. Thanks. ...

keeping xmphp bot always online

I created a simple xmpp bot in PHP which connects to google talk server. I basically modified the cli_longrun example. When I run the script in browser the bot comes online and stays online for a while even after I close the tab on which the script was running (as it is just an infinite loop listening for events on the stream). But after...

Included php file calling Javascript function

Hi there! Here's the deal. I've got index.php which links to an internal JS file in it's header. index.php then includes another .php file, which outputs this: + add file. addFile() is a Javascript function defined in the external JS file. By doing this nothing happens, the included php does not "see" the JS function. Encapsulating the...

what is the purpose of magic_quotes_gpc in php.ini file.

Hi, Can anyone tell me what is the significance of the key magic_quotes_gpc in php.ini file. ...

Which error outputs can I expect from PHP?

I want to build a regex that matches PHP-style error messages in HTML source code. Does anybody know of one that exists or how I can create a list of possible PHP error outputs? ...

Dynamic XML based chart for showing database information

Can any one, please tell me is there any open source available for showing database order information into graphical chart using PHP-XML? ...

passing a variable by value using php

...

How to upgrade php on server running Plesk Virtuozzo!?

How on earth does plesk actually work? I have a VPS which is on centos 5.2 and has php 5.1.6. I have updated plesk to version 9.52 and it claimed to do some form of php update but it hasn't as far as i can see. How can i update to php 5.2 (centos 5.4) without breaking plesk Virtuozzo?! Plesk seems to be some kind of crazy black magic th...

Get seconds until the end of the month in PHP

Hello, I would like to set a cookie with PHP that has to expire at the end of the month. How can I get the number of seconds until the end of the month? Thank you. ...

PHP function to find out the number of parameters passed into function?

Hi all, Is there a PHP function to find the number of parameters to be received/passed to a particular function? ...

Communication between two server

can any one please tell me what are the other ways to build the communication between two website's server without using "nusoap" ...

Drupal - db_fetch_array returns NULL for every row

I'm using Drupal's db_fetch_array to fetch rows from my db_query. However, every row returned is equal to NULL. Typing the query into PHP myadmin works, so I have no idea whats going on. db_num_rows returns the number of rows as well. Here is the code: if(count($rebuild_ids)) { $ids=implode(",",$rebuild_ids); $type_stmt = "SEL...

PHP DateTime Regex

Hey, long story short I have inherited some terrible code. As a result a string comparison is buggy when comparing dates due to the format of the date. I am trying to convert the date to a valid DateFormat syntax so I can run a proper comparison. These are some samples of the current format: 12/01/10 at 8:00PM 12/31/10 at 12:00PM 12/...

mysQL Query help regarding find text

Hello, I need to get all rows in which eventname field contains this text (including single quote) 's Birthday I tried this but it is giving error: select * from fab_scheduler where eventname like '%\'s Birthday%' How do i construct such query? Thanks ...