Is it faster for the randomize the sort order of a large set of results on the MySQL server or after I have received the data in PHP?
Does anyone have any data to backup either side, or even anecdotal experience?
...
I want to get contents of a .php file in a variable on other page.
I have two files, myfile1.php and myfile2.php.
myfile2.php
<?PHP
$myvar="prashant"; //
echo $myvar;
?>
Now I want to get the value echoed by the myfile2.php in an variable in myfile1.php, I have tried the follwing way, but its taking all the contents includ...
<?php
session_start();
if(isset($_SESSION['views'])) {
$_SESSION['views'] = $_SESSION['views']+ 1; }
else {
$_SESSION['views'] = 1; }
echo "views = ". $_SESSION['views'];
?>
I am trying to set the session and increment the session on every refresh. But its always returning "1" for $_SESSION['views']. What is wrong with this...
I have a server which is set to EST and all records in the db are set to EST. i would like to know how to set it to gmt? I want to put a time zone option to my users.
...
For an example, there is a set_user function
$facebook->set_user
but I typed in set_user at the facebook developer wiki search box, it returns
'There is no page titled "set_user"'
http://wiki.developers.facebook.com/index.php/Special:Search?search=set_user&go=Go
Where can I find the list of the functions and properties for the f...
I apologise in advance as this is not stricltly a coding question, but, I wanted to canvass as wide a spectrum of opinion as possible.
I have been using hte Zend php stack (among others) for some years now mainly because htey offer the best ORACLE support and they offer commercial support which keeps my corporate clients happy (middle m...
I was recently brought on to help with a project that was made up of individual HTML files with the exception of a PHP contact form. So there's not even a hint of object oriented programming, MVC, or layouts (or even PHP for that matter).
The project is quite large, but I wanted to slowly integrate the Zend Framework into this project, ...
Duplicate: Convert HTML + CSS to PDF with PHP?
I am looking php based library for HTML->PDF convertor, for report generation in my application. By far I found one, and it seems good, but has some limitations.
Can anyone suggest any other advanced ones?
Thanks.
...
Hey All,
I have a cron job the executes a PHP script. The cron is setup to run every minute, this is done only for testing purposes. The PHP script it is executing is designed to convert videos uploaded to the server by users to a flash format (eg... .flv). The script executes fine when manually doing it via command line, however when e...
Situation: a user clicks on a link, the server gets the request and starts processing it. In the meanwhile, the user clicks on another link, the server gets the new request while processing the 1st one. What happens? On the client side we only see the webpage from the 2nd request, but is the process from the 1st request killed on the ser...
I have several option that a user can have, mainly to validate his presence around the site.
Tables are like this:
Users:
id=1
username=stackoverflow
password=oSKAJMMS;
address=xyz
...
Options:
user_id=1
option=AD3
user_id=1
option=AC1
At some point I need to check if he has a particular option (like: AD3, AC1 etc) in the "op...
Edit: I found the soluton for getting the correct URL. Se the solution in this thread.
Hi, I'm having problems prosessing a form so that I can save it's data in my MySQL database. I'm using Wordpress as CMS.
I've used this example: http://www.ryancoughlin.com/2008/11/04/use-jquery-to-submit-form
I'm pretty sure that the source of my p...
I'm in the process of creating a blog for somebody. They want to pull in a lot of data and integrate it quite tightly into the design, so standard widgets are a no-no. That's been fine until now.
They have a public access Google Calendar with various events on it and I want to grab the next 5 events (from "now" onwards) and display the...
I have started debugging my RSS feed because it has some strange characters in it (i.e. the missing-character glyph). I started with two excellent beginner resources:
The Absolute Minimum Every Software Developer Absolutely, Positively Must Know About Unicode and Character Sets: http://www.joelonsoftware.com/articles/Unicode.html
Chara...
Hi,
We are developing an e-commerce platform utilizing the Zend Framework. We have several instances of the application up and running, using the same code base. Config settings are used in order to differentiate the various shops.
The challenge we are facing, is that we want to keep the general platform as it is now, and extend it rat...
I want to know where is the best place to put the model classes inside a Zend Framework project. I heard that inside the library is the better place with versions < 1.8. And with version 1.8 we have the ResourceLoader so we can put inside the modules dir.
What's your method? What's the best practice?
...
How do i update mysql database with ajax and php with no page refresh
...
Hi there
I generate some png charts and excel files using a mysql database. I display the charts as images in my webapplication, but from time to time IE users don;t have acces to the last version of the files because IE keeps showing to them the previous loaded datas(charts and excel files)
How to prevent happening that? On the clien...
I'm using curl to retrieve information from wikipedia. So far I've been successful in retrieving basic text information but I really would want to retrieve it in HTML.
Here is my code:
$s = curl_init();
$url = 'http://boss.yahooapis.com/ysearch/web/v1/site:en.wikipedia.org+'.$article_name.'?appid=myID';
curl_setopt($s,CURLOPT_URL,...
I just finished coding an online portal with Kohana PHP.
It works fine on my PC, but when I tried to host it on another server, "BONK!",
it shows up without displaying the pictures of the products.
I don't even know what's going on.
What rules I should follow to make my Kohana apps portable?
...