php-general Digest 13 Aug 2010 15:49:44 -0000 Issue 6891

2010-08-13 Thread php-general-digest-help
php-general Digest 13 Aug 2010 15:49:44 - Issue 6891 Topics (messages 307409 through 307434): Re: Storing Social Security Number WAS: Encryption/Decryption Question 307409 by: Ashley Sheridan 307410 by: Richard Quadling 307413 by: tedd 307415 by: tedd

[PHP] Cake

2010-08-13 Thread Philip Thompson
Hi all. Having an issue with some CakePHP 1.3 stuff. I've read and read and read and haven't found my solution. I'm fairly new to Cake, so be nice. I'm trying to access a method from a different controller than the one I'm in and it's not letting me. -location.php (model) - create the

[PHP] Setting up a 2 Column Display for SQL Recordset

2010-08-13 Thread DealTek
newbie question: Hi Folks, I have a php / sql data recordset that has 200 names that I want to display in a 2 column display ( down on left then down on right side - not left right - left right). So I can create a 2 column table. Then I need to split the data result in 2 parts - so part 1

[PHP] Resource logging PHP extension

2010-08-13 Thread Bostjan Skufca
Hi all! I just wanted you to know that I've created an extension which does resource logging for each pageload. Works with 5.2.14 and 5.3.3 versions of PHP, tested with Apache and CLI sapis. It logs PHP memory consumption, real time spent, cpu time spent (user and sys, in jiffies), page faults

[PHP] Re: Cake

2010-08-13 Thread Philip Thompson
On Aug 13, 2010, at 10:49 AM, Philip Thompson wrote: Hi all. Having an issue with some CakePHP 1.3 stuff. I've read and read and read and haven't found my solution. I'm fairly new to Cake, so be nice. I'm trying to access a method from a different controller than the one I'm in and it's

Re: [PHP] Setting up a 2 Column Display for SQL Recordset

2010-08-13 Thread chris h
Dave I would look into something like the array_slice function. http://us3.php.net/manual/en/function.array-slice.php With this function you could create two arrays - one for the left column, and one for the right column - and iterate through them simultaneously. i.e. untested: given $allNames

[PHP] [ENCODING QUEUE] - anyone think of a good way to setup a queuing system so everyone gets their turn

2010-08-13 Thread Tristan
i have a list of people that uploaded their videos waiting to be encoded. these are the line items for the db id | member_id | created | status I just want to make sure that everyone gets a turn processing. I was thinking WHERE DISTINCT(member_id) and created (oldest) but i see some flaw in

Re: [PHP] [ENCODING QUEUE] - anyone think of a good way to setup a queuing system so everyone gets their turn

2010-08-13 Thread Ashley Sheridan
On Fri, 2010-08-13 at 14:48 -0600, Tristan wrote: i have a list of people that uploaded their videos waiting to be encoded. these are the line items for the db id | member_id | created | status I just want to make sure that everyone gets a turn processing. I was thinking WHERE

Re: [PHP] [ENCODING QUEUE] - anyone think of a good way to setup a queuing system so everyone gets their turn

2010-08-13 Thread Tristan
Here's a question for you about encoding on the server. If two videos are encoding at the same time. Do they share the processing power. lets say we have 2 vids same size 1 encodes at 1 minute and then if 2 are going at the same time does it encode them both in 2 minutes? Thanks, T On Fri,

Re: [PHP] [ENCODING QUEUE] - anyone think of a good way to setup a queuing system so everyone gets their turn

2010-08-13 Thread Ashley Sheridan
On Fri, 2010-08-13 at 15:24 -0600, Tristan wrote: Here's a question for you about encoding on the server. If two videos are encoding at the same time. Do they share the processing power. lets say we have 2 vids same size 1 encodes at 1 minute and then if 2 are going at the same time

[PHP] It's Friday (a MySQL Question)

2010-08-13 Thread tedd
Hi gang: Normally if I want to dump a MySQL database, I read the database via a PHP script (i.e., list tables and fetch rows) and save the results as a text file -- after which I download the file -- it's not a big deal. However while I was doing my daily read of the MySQL Manual, namely:

Re: [PHP] It's Friday (a MySQL Question)

2010-08-13 Thread Ashley Sheridan
On Fri, 2010-08-13 at 17:48 -0400, tedd wrote: Hi gang: Normally if I want to dump a MySQL database, I read the database via a PHP script (i.e., list tables and fetch rows) and save the results as a text file -- after which I download the file -- it's not a big deal. However while I

Re: [PHP] It's Friday (a MySQL Question)

2010-08-13 Thread Daniel P. Brown
On Fri, Aug 13, 2010 at 17:48, tedd t...@sperling.com wrote:    SELECT * FROM table_reference INTO OUTFILE 'file_name' It looked to be bit simpler/shorter than my code, so I tried it. But it reports:    Access denied for user 'me'@'localhost' (using password: YES). I suspect that the

RE: [PHP] It's Friday (a MySQL Question)

2010-08-13 Thread Daevid Vincent
-Original Message- From: Ashley Sheridan [mailto:a...@ashleysheridan.co.uk] Sent: Friday, August 13, 2010 3:00 PM To: tedd Cc: php-general@lists.php.net Subject: Re: [PHP] It's Friday (a MySQL Question) On Fri, 2010-08-13 at 17:48 -0400, tedd wrote: Hi gang: Normally

Re: [PHP] It's Friday (a MySQL Question)

2010-08-13 Thread Daniel P. Brown
On Fri, Aug 13, 2010 at 17:59, Ashley Sheridan a...@ashleysheridan.co.uk wrote: echo 'password' | mysql -u root -p query If you're going to do the password in plain text from the command line like that (which is a bad idea), you don't need to pipe an echo. Just type: mysql -u

Re: [PHP] It's Friday (a MySQL Question)

2010-08-13 Thread Ashley Sheridan
On Fri, 2010-08-13 at 18:14 -0400, Daniel P. Brown wrote: On Fri, Aug 13, 2010 at 17:59, Ashley Sheridan a...@ashleysheridan.co.uk wrote: echo 'password' | mysql -u root -p query If you're going to do the password in plain text from the command line like that (which is a bad

[PHP] login to protected directory by php

2010-08-13 Thread Ali Asghar Toraby Parizy
Hi. I have a protected directory in my host. I have configured .htaccess successfully and it works prefect. Now I'm looking for a solution to login and logout by a php script. In my site I have a login page. In that page I set 'PHP_AUTH_USER' and ' PHP_AUTH_PW'. but when I try to open protected

Re: [PHP] It's Friday (a MySQL Question)

2010-08-13 Thread Daniel P. Brown
On Fri, Aug 13, 2010 at 18:17, Ashley Sheridan a...@ashleysheridan.co.uk wrote: To both David and Daniel, thank you! How on earth I ever missed that argument before is a wonder known only to the great electronic deity in the sky! Hey, Daevid: you may have been thanked first, but at least

Re: [PHP] It's Friday (a MySQL Question)

2010-08-13 Thread Ashley Sheridan
On Fri, 2010-08-13 at 18:22 -0400, Daniel P. Brown wrote: On Fri, Aug 13, 2010 at 18:17, Ashley Sheridan a...@ashleysheridan.co.uk wrote: To both David and Daniel, thank you! How on earth I ever missed that argument before is a wonder known only to the great electronic deity in the

RE: [PHP] It's Friday (a MySQL Question)

2010-08-13 Thread Daevid Vincent
-Original Message- From: Ashley Sheridan [mailto:a...@ashleysheridan.co.uk] Sent: Friday, August 13, 2010 3:23 PM To: Daniel P. Brown Cc: tedd; php-general@lists.php.net Subject: Re: [PHP] It's Friday (a MySQL Question) On Fri, 2010-08-13 at 18:22 -0400, Daniel P. Brown wrote:

Re: [PHP] It's Friday (a MySQL Question)

2010-08-13 Thread tedd
At 6:11 PM -0400 8/13/10, Daniel P. Brown wrote: On Fri, Aug 13, 2010 at 17:48, tedd t...@sperling.com wrote: SELECT * FROM table_reference INTO OUTFILE 'file_name' It looked to be bit simpler/shorter than my code, so I tried it. But it reports: Access denied for user

Re: [PHP] It's Friday (a MySQL Question)

2010-08-13 Thread chris h
Tedd I don't know if this will resolve your issue or not, but have you looked into using mysqldump? http://dev.mysql.com/doc/refman/5.1/en/mysqldump.html That's what I use for my backups. Chris. On Fri, Aug 13, 2010 at 6:47 PM, tedd t...@sperling.com wrote: At 6:11 PM -0400 8/13/10, Daniel

Re: [PHP] login to protected directory by php

2010-08-13 Thread chris h
Based off what your saying my guess is that the request is not hitting your php script. Is the php script in the protected directory? If so what is it's file name and what url are you hitting for the test? Chris. On Fri, Aug 13, 2010 at 6:21 PM, Ali Asghar Toraby Parizy

Re: [PHP] It's Friday (a MySQL Question)

2010-08-13 Thread Simon J Welsh
On 14/08/2010, at 9:59 AM, Ashley Sheridan wrote: I've only ever done something like this via the command line. Having said that, could you maybe pass a command line string to exec(). Something like (untested): echo 'password' | mysql -u root -p query I believe that is the right sort of

[PHP] Updating Multiple rows in mysql w php at once (newbie)

2010-08-13 Thread DealTek
Hi all, another newbie question I have a recordset from mysql - a list of 20 or so products... 1 - I would like create an edit form to loop through the records and edit a text field called 'favorite' for each of the records - (this, I have done)... 2 - then I would like to submit the

Re: [PHP] Updating Multiple rows in mysql w php at once (newbie)

2010-08-13 Thread chris h
you can do it like this... input name=field[] value=zero type=text / input name=field[] value=one type=text / input name=field[65] value=sixty-five type=text / input name=field[car] value=truck type=text / on the php side this would equate to... echo $_POST['field'][0]; // prints zero echo

Re: [PHP] [ENCODING QUEUE] - anyone think of a good way to setup a queuing system so everyone gets their turn

2010-08-13 Thread Tristan
I don't know what hardware we have to be honest. I'm sure they are multi core and I know they are XEON's 64bit Linux Graphics card i'm sure is just some integrated garbage. As for software I am using FFMPEG Thanks, T On Fri, Aug 13, 2010 at 3:41 PM, Ashley Sheridan