Calling the stored procedure
CALL rebuild; How would i call this each and every time dynamically without doing a query in database. I mean each time i update some value, i need to call this to make sure the changes are in effect. ...
CALL rebuild; How would i call this each and every time dynamically without doing a query in database. I mean each time i update some value, i need to call this to make sure the changes are in effect. ...
I have written the following db interface class: <?php // dbinterface.php class db { private $con; private $host; private $user; private $pass; private $database; private $error; function db($host, $user, $pass, $database) { $this->con = mysql_connect($host, $user, $pass); mysql_select_db($databa...
$posts = array( "message" => 'this is a test message' ); foreach ($posts as $post) { echo $post['message']; } Why does the above code only output the first letter in message? "t". Thanks! ...
i have a page performing the following ajax request when a button is pressed. normally i get a json object back and it works fine, i have noticed on intermittent requests (usually only the first request from that page), i get back a 200 success code with a blank page. if i reload the html page, then press the button again it works fi...
I have a script which at one point returns an image thumbnail using jquery built in java request. Every time the php function get called, this thumbnail gets updated, but keeps the exact same filename. Problem is that the browser caches the thumbnail and it looks like it never gets updated. Are here any techniques to avoid this? ...
I have a sqlite3 database on my harddrive (file.db) with 5 tables. I'd like to copy 3 of these tables to an in-memory database (:memory:). Is there a simple way to do so using PHP5's PDO format? ...
I have two controllers which have some actions that are really the same. How do I refer to the identical action in another controller? class UserController extends Zend_Controller_Action { public function listAction() { //do something here } } class AdminController extends Zend_Controller_Action { public...
I'm having some serious issues using Zend_Lucene and foreign characters like åäö. These issues appear both when the index is created and when it's queried. I've tried both iso-8859-1 and utf-8. ISO-8859-1 The query that doesn't work looks like "+_area:skåne". With Zend_Lucene I'm getting no matches, but if I run this query in Luke I ge...
Hi, I am looking to integrate http://alipay.com, a chinese payment platform with my php-project. are there any free or opensource api's that one can leverage (with documentation preferably in english language) ? thanks in advance. ...
I currently ftp all my files to my website when i do an update (over a slowish adsl connection) And I want to make things easier, so I just recently started using a hosted svn service, and i thought i could speed things up a bit by doing an svn export of my website directly onto my webserver i have tried that a few times and it seems...
I am unable to include a remote PHP file in my PHP script. I suppose my hosting changed php settings. The code I was using was: include "http://domain.com/folder/file.php"; How do I allow enable the include function using php.ini/.htaccess ? Is there any other workaround? Thanks. ...
Hello, I'm looking for an easy way to go back to the previous release if something goes wrong with the last realease in Capistrano Is there any command like "cap goback" to undo the last deploy? (thus updating the current symlink to it's old location) Is this built-in or I just have to make a task myself? Here's my recipe: set :user...
example: class Vendor_ClassName_Helper { CONST FIRST_OPTION = 1; CONST SECOND_OPTION = 2; public function __construct($option, $otherArgument) { } } client code: $obj = new Vendor_ClassName_Helper(Vendor_ClassName_Helper::FIRST_OPTION, $var); Any good ways to avoid the long lines (and this is a rather short examp...
Hi, We have a function used within our PHP/MySQL application which returns basic configuration information, it contains a simple select query and looks like this: public function getConfigurationValue($field) { $res = mysql_query("SELECT `cfg_value` FROM `ls_config` WHERE `cfg_name` = '".mysql_real_escape_string($field)."'"); $...
I'm writing an iPhone app. This app requires users to login on a remote web server which is using php + mysql. How can the server handle this? Using sessions? Cookies? unique IDs? Any link/code/tutorial on how to do this would be great. Thanks! ...
I know the difference between include and require. And I use require in several places in my project. But here is the thing: I want to include files ONCE and be able to call it's functions from other include files. In my header.php file, I have the following code: <?php require_once('include/dal.php'); require_once('include/bll.p...
What I am trying to accomplish is to have checkbox labels display after checkbox input fields (to the right of them). I am using these decorators now: private $checkboxDecorators = array( Label, array(array('data' => 'HtmlTag'), array('tag' => 'div', 'class' => 'checkbox')), 'ViewHelper', array(array('row' => 'HtmlTag')...
This is probably really obvious and simple - but it isn't to me with my rudimentary knowledge:) I've got two tables: table_items ----------- item_id ¦ item_name ¦ item_describtion ¦ more item stuff..... table_subitems ----------------- subitem_id ¦ item_id ¦ subitem_name ¦ More subitem stuff Each item can have zero to pretty much un...
I have a user registration form in PHP .I put captcha image check in the page.I used it like this //img id="imgCaptcha" src="create_image.php"// and in my javascript i want to validate this with the same number which is generated in the image (from create_image.php page) . That number was set in a session variable too. but when I get...
Possible Duplicate: What is the PHP ? : operator called and what does it do? $id = isset($_GET['id']) ? intval($_GET['id']) : 0; Can someone help me understand the above code? I'm fairly new to php :) What up with ? and :? I would appreciate it! ...