Hi,
I'm using ajax to update a textbox once the value in a drop down box has been selected. However, i only update/put text in it if certain conditions are met, so it looks rubbish when there is no message. I was thinking that having a label there would be much better, but is this possible? Can i have an empty label and just update the ...
I have to put datas every 10 seconds in an array. Is it silly to index this array with modified timestamps
$a[timestamp] = 54;
$a[timestamp+10] = 34;
or in Javascript with the setInterval() and passing via Ajax the index (very crappy to me) ?
or have I a best option ?
Further details :
I have to link the real-time with entries in...
I want to insert a image in blob format to db.
how to write a program in zend framework.
a simple form
just choose one image and insert into db.
...
I'm creating a tree-structure of categories with parentid's which can be called from children in such a way:
ID | Name | ParentID
1 1 0
2 2 1
3 3 2
4 4 1
Resulting in this:
1 = 1
2 = 1 -> 2
3 = 1 -> 2 -> 3
4 = 1 -> 4
which means 3 is a child of 2, which is a child of 1.
when trying to get this idea ...
I'm trying to call a function Size() from a custom COM DLL from PHP. That function should return a struct with 4 members (top, left, bottom, right) however when I call that function from PHP I get the following error:
Error [0x80070057] The parameter is
incorrect.
I don't pass it any parameter and according to the specs it should...
Like at Digg.com, I want to get members' pictures cropped for an avatar use. Please show me how to do this in PHP.
...
Is it possible to create a multilingual site only in php without mysql (database)
a good resource will be nice to have please provide
...
Here's the situation. While uploading a video, I want to capture a screenshot of that video and save it as a video thumbnail. I currently can't install ffmpeg on my local machine (it will be installed on the production server of course) so I cannot test the following controller action helper I wrote for this purpose:
<?php
/**
* FlvThu...
I started to build a POS system in Doctrine. I am getting an order, but I have no clue whether or not I even set up subclasses in the proper way for Doctrine.
Here is the model I came up with for line items on an order
lineItem: line_total, order_id, type
rentLineItem: returned_date_time, item_id, sold
buyLineItem: item_id
The databa...
Is it possible to output SQL query result in one string or variable? (i'm bad in php and mysql)
Let's say I have db "agents" with columns - agent_id, agent_fname, agent_lname, agent_dept.
Using this query:
$sql = SELECT a.`agent_fname` FROM agents a WHERE a.`agent_dept` = 'FCA'
I want to get a string or a variable, so I can use it in...
I have a cron job that ideally I want to run hourly (it's on the FB accelerators and deals with realtime social stuff, so once an hour doesn't cut it)
1) Can I have a cron job that contains "run(), sleep(60), run()..." that lasts for 60 minutes?
2) Frequency of running aside, it currently outputs:
...web/public/mysqltest.php: ?php: ca...
I suspect I'm doing something stupid here, but I'm confused by what seems like a simple problem with SPL:
How do I modified the contents of an array (the values in this example), using a RecursiveArrayIterator / RecursiveIteratorIterator?
Using the follow test code, I can alter the value within the loop using getInnerIterator() and off...
Is there already any software that will allow me to select a table or row from existing DB, edit that table, add new rows, or clone existing ones, then insert the new rows back into the DB?
Read: i want to ADD this data, do not want to update/replace existing data.
PHP5, and MySQL 5
...
I have a cron that for the time being runs once every 20 minutes, but ultimately will run once a minute. This cron will process potentially hundreds of functions that grab an XML file remotely, and process it and perform its tasks. Problem is, due to speed of the remote sites, this script can sometimes take a while to run.
Is there a sa...
Hi all,
I'm trying to compare an MD5 checksum generated by PHP to one generated by Oracle 10g. However it seems I'm comparing apples to oranges.
Here's what I did to test the comparison:
//md5 tests
//php md5
print md5('testingthemd5function');
print '<br/><br/>';
//oracle md5
$md5query = "select md5hash('testingthemd5fun...
This is sort of complicated for me to explain,let me try anyway. i want to know how can i manipulate the string i've collected from this(such type of ) textbox and use it for my pupose in webapp or dektop app.
i mean for example, i've two situations.
1) If i've to take the search string in text box and want to forward user to say s...
Is this legal?
<?php
function ftw($foo = 'pwnage', $nub = MENU_DEFAULT_VALUE, $odp = ODP_DEFAULT_VALUE) {
//lots_of_awesome_code
}
?>
where MENU_DEFAULT_VALUE and ODP_DEFAULT_VALUE are previously constants defined previously in the file.
Thanks.
...
Doctrine documentation says you can use
public function construct() { ... }
as a construct function since __construct can't be overridden.
When I place it in my code and put a echo in it
public function construct() { echo "constructing..."; }
it isn't called during the construction of the object.
How is it supposed to be called o...
If I want to do something like this (notice the expires line):
$duration=24; //in hours
$reset=new PasswordReset();
$reset->code=md5(uniqid());
$reset->expires="now() + interval $duration hours";
$reset->User=$user;
$reset->save();
How can I get Doctrine to NOT quote it before sending it to postgresql? I know I could do this in PHP, ...
I have a mysql query that runs in a php file that outputs a page of data. I need to somehow output that data to a file, to allow me to perform client side functions on that data as needed before exporting it for download.
I need the temporary file named as a timestamp. Im wondering if i should use the fopen to create the file with the n...