Re: [PHP] Streaming video BLOBs from MySQL
Hmmm... not sure how this is done. I see someone added an example that they use substring to load 10mb of data at a time from the blob. The part I don't understand is how they loop the statements and continue to stream data to the user. If I make one pass and get 1mb of the blob...the browser is simply going to load that 1mb only, right? How do I keep looping and refreshing the users browser, or in this case, flash player? Thanks for any ideas! --- Marek Kilimajer [EMAIL PROTECTED] wrote: J J wrote: I have a case where video files (mov, flv, etc) have been stored in a MySQL database as blobs. I'm loading them into a flash video player and everything works fine except it takes longer it seems and it doesn't allow streaming the actual video. If I load the same videos with a direct link to the http:// file system (/videos/file.flv) it loads in super-fast and allows streaming. I'm guessing mysql and/or php doesn't actually release the BLOB until it's loaded it completely. So, is there a way to actually have PHP read the BLOB and stream it as it's loading? Is there an fstream() option like the fread()? use mysql's SUBSTRING() function in a loop __ Do you Yahoo!? Yahoo! Small Business - Try our new resources site! http://smallbusiness.yahoo.com/resources/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Streaming video BLOBs from MySQL
I have a case where video files (mov, flv, etc) have been stored in a MySQL database as blobs. I'm loading them into a flash video player and everything works fine except it takes longer it seems and it doesn't allow streaming the actual video. If I load the same videos with a direct link to the http:// file system (/videos/file.flv) it loads in super-fast and allows streaming. I'm guessing mysql and/or php doesn't actually release the BLOB until it's loaded it completely. So, is there a way to actually have PHP read the BLOB and stream it as it's loading? Is there an fstream() option like the fread()? Wishful thinking? __ Do you Yahoo!? Yahoo! Mail - Helps protect you from nasty viruses. http://promotions.yahoo.com/new_mail -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Finding records within 15 minutes from now?
I'm struggling with the php or mysql query to find records within my database that are within 15 minutes from now and prior. Example: It's 2:30pm on 4/12/05 I need to find all records with a RecordTime of 2:45pm and previous. So it should find: rec1 time: 2:45 date: 4/12/05 rec2 time: 2:00 date: 4/12/05 rec3 time: 1:30 date: 4/8/05 etc. It would not find: rec4 time: 3:15 date: 4/12/05 rec5 time: 4:00 date: 4/23/05 Make sense? I'm reviewing the manuals for datediff, curdate and other functions but nothing seems to be making sense for what I need. Any ideas? Thank you in advance! __ Do you Yahoo!? Yahoo! Small Business - Try our new resources site! http://smallbusiness.yahoo.com/resources/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Unique ID system - need help/ideas
I was given a database that has uniques IDs such as: AL1 AL2 AR1 AR2 MI1 etc... The first two letters are based on the state they live in, then it would need to look at the next 5 characters to determine the next ID. My problem is how do I recreate this in PHP to make sure any newly added records follow this same unique ID? So if I insert another Alabama record the id would be: AL3 Or insert a record from a new state would be: NY1 (so NY0 is the default starting point) Any ideas? Thank you in advance! __ Do you Yahoo!? Yahoo! Search - Find what youre looking for faster http://search.yahoo.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Unique ID system - need help/ideas
I'd like to keep it in one field if possible since that's how their database is now and data will be going back and forth. Plus there should be allowed two of the same numbers, so like: AL3 KY3 So any state with more than one record can be sequential and not jump around like KY3, AL4, KY5, etc. Make sense? --- Chris W. Parker [EMAIL PROTECTED] wrote: J J mailto:[EMAIL PROTECTED] on Wednesday, March 10, 2004 3:46 PM said: Any ideas? Thank you in advance! does it all have to be in the same field? can you not just combine two fields? one field would be called 'id' and it would be auto-incrementing. second field would be 'state' and it would contain the two letter abbreviation. i can think of a few other ways to get it all into one field, but they're a bit less efficient. then again i'm no sql expert. chris. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php __ Do you Yahoo!? Yahoo! Search - Find what youre looking for faster http://search.yahoo.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Unique ID system - need help/ideas
Will it be able to figure out what the last number is if it's a character type and the number is something like 3? So it'll add one to make it 4 and not something like 10003. ?? --- Chris W. Parker [EMAIL PROTECTED] wrote: yeah that makes sense. hmm.. well i'll give you my idea.. but it's very possible there's a better way to do it (than what i'm going to suggest). ok. one field will be used. it'll be a text (varchar) field. before you do an insert you'll need to find out what's in there ahead of time and then adjust accordingly. i'd select the last record that contained the two letter abbreviation, find out what the number was, increment it, then reconstruct the id and insert the new one. this of course won't prevent the exact same process from happening at the exact same time. i mean, two sessions could pull the same id and then reconstruct the (new, but) same id. make sense? chris. __ Do you Yahoo!? Yahoo! Search - Find what youre looking for faster http://search.yahoo.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Unique ID system - need help/ideas
Yeah thanks for the feedback, I'm already including a primary key auto_increment field in place to tie the tables together with an ID I *know* will be unique. This other ID scheme is just to work within their existing system that uses this. I'm just trying to mirror/maintain that scheme for their purpose. --- Miles Thompson [EMAIL PROTECTED] wrote: For the original poster: Having said all this, make certain that there is a unique, system-generated, primary key for each table. As these keys *never* have to be seen by the public, don't get tampered with, etc., they can be safely relied on for inter-table relationships. Down the road they will save your bacon. If the purpose of having separate numbering sequences for each state is to keep track of a count, why bother? Just select for a count on each state. If it's a matter of ego, in that if I have a lower registration number I have higher status, well fill your boots with whatever scheme will work. Really look at this v. closely. Quite often clients insist on wacko numbering schemes which they are convinced are important, but frequently result only because that's the way it's always been done. Also remember there should be no data encoding within a field - that's why so many columns are possible. Example, membership numbers like MABT082003BM2, where the first four characters are my initials, the next six the date I joined, and each of the next the colour of my eyes, marital status and number of children, ARE FORBIDDEN. All that information belongs in separate fields. This is what you are tending towards with AL0003 and KY00107. Bad practice. As I'm Canadian, if I stepped on any toes I'll apologize in advance. g Cheers - Miles -- __ Do you Yahoo!? Yahoo! Search - Find what youre looking for faster http://search.yahoo.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Unique ID system - need help/ideas
Wow I think you are on to something!!! I'll give it a whirl! Thanks! --- [EMAIL PROTECTED] wrote: On 10 Mar 2004 J J wrote: My problem is how do I recreate this in PHP to make sure any newly added records follow this same unique ID? I haven't played much with these functions but I think for MySQL you'd want something like this, for the state XX (excuse the wrapped lines): if ($result = mysql_query(select max(id) from table where left(id, 2) = 'XX')) { $row = mysql_fetch_row($result); $newid = strpad($row[0] + 1, 5, 0, STR_PAD_LEFT); mysql_query(insert into table set id = 'XX' . $newid); $newrecnum = mysql_insert_id(); } That is crude and uuntested, needs some error checking and most likely table locking, but it's one possibility for a base. -- Tom -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php __ Do you Yahoo!? Yahoo! Search - Find what youre looking for faster http://search.yahoo.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] PHP form to fax?
Does anyone use this service with PHP and would it be possible to see some sample code on how you format the email/message to their server? I couldn't find any information on PHP and utilizing their service, or how the message needs to be formatted. Thanks! --- Jeff McKeon [EMAIL PROTECTED] wrote: There are plenty of commercial email to fax providers out here like jfax. If an email is formatted correctly and sent to the your jfax address, jfax will parse out the fax number and then send the email contents as a fax. It works in reverse as well. Any fax to your jfax number (you can get them worldwide) is turned into an image and emailed to you as an attachment. -Original Message- From: J J [mailto:[EMAIL PROTECTED] Sent: Thursday, September 25, 2003 2:49 PM To: [EMAIL PROTECTED] Subject: [PHP] PHP form to fax? I know in the past it wasn't possible to do something like have a user fill out a web form and that information would then be sent to a fax machine. This would require some sort of dialing abilities on the server. Is there anything available today that could perform such a function possibly within PHP? With all the IP telephony abilities, I figured maybe something is available now. I'd like to have the option to send web form information to email or fax. Email isn't a problem but fax I'm kind of stuck. Any ideas? __ Do you Yahoo!? Free Pop-Up Blocker - Get it now http://companion.yahoo.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Avoiding duplicate orders?
What is the simplest way to avoid duplicate order entry on a form? Some people aren't patient enough to wait for the SSL/credit card processing and will click the submit button two, three, or more times causing duplicate orders. Is there a quick way to disable the submit button at least in javascript? Better yet, something quick and easy that could be done server-side without a lot of programming like cookies, database flags, etc? I've thought of a few things (like hidden variables with an order ID or cookies/flags) but this really should be a quick fix since it's not a big problem on the site. Thanks in advance for any tips or techniques! __ Do you Yahoo!? Free Pop-Up Blocker - Get it now http://companion.yahoo.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Page breaks and printing?
Is there a good way in PHP to determine page breaks for long reports and printing? I'd like to be able to best determine where pages should begin and end and reprint things like table/page headers and footers on each page so the reports print nicely. I'd like to avoid having to output to PDF or Word for this formatting. Is it possible with just PHP or maybe PHP + CSS? Anyone know of any good examples of this? Thanks in advance! __ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Timezones and Daylight Savings Time
They want everything set to their time, so it would probably be easier just to determine the server time and add as necessary. I think... --- Jeff McKeon [EMAIL PROTECTED] wrote: What if you set the server to use UTC and then used the clients local system setting to offset it for each client? So the server would have it's time at UTC and a client in the Eastern US would be at -4. You could then detect the web client timezone setting and adjust as needed? This is just a logic suggestion, I have no idea if it's possible with code but I would imagin it would be.. Jeff __ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] PHP form builder?
I've seen survey tools before to build surveys dynamically with PHP code, but I'm looking for something a bit more simple that just allows you to build HTML forms dynamically. Something where I say I need 10 fields, some checkboxes, a submit button and it then generates the form on the fly. Then that form could be submitted to a database, or direct to email, etc. Is there something like this built already in PHP/Javascript? __ Do you Yahoo!? SBC Yahoo! DSL - Now only $29.95 per month! http://sbc.yahoo.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Using PHP to read style sheet -- create drop-down?
Is it possible for PHP or maybe javascript+php to read in a style sheet (whatever.css) and create a drop-down of all the elements within that style sheet? CSS contains: .heading {blah blah size blah} .headingBold {blah blah size blah bold} Then in PHP I'd like to have a drop down that shows those elements found in the style: select option heading option headingBold /select Is that possible to read in another file to create a drop-down? Thanks in advance! __ Do you Yahoo!? SBC Yahoo! DSL - Now only $29.95 per month! http://sbc.yahoo.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Source/version control?
What tools do you recommend or use for a team environment that will allow us to maintain source control and even offer some version tracking/history in case we need to go back to old code? We need the ability to check-in and check-out files in a team environment --- normally just HTML and PHP type files. We have a local windows server we can work from or a Linux development server that is remote. Primarily work is done in Dreamweaver and Flash. Low or no cost would be ideal. Thoughts or suggestions are appreciated. __ Do you Yahoo!? SBC Yahoo! DSL - Now only $29.95 per month! http://sbc.yahoo.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] phpMyAdmin to output CSV to excel (including fieldnames)
I see all the options in phpMyAdmin for CSV/excel output but I can't get it to export the fieldnames, headers as well. It'd be nice to have it automatically do that into excel so the output is easier to follow and provide to someone else. Am I just missing the option in phpMyAdmin or does it not output the fieldnames into CSV/excel? __ Do you Yahoo!? SBC Yahoo! DSL - Now only $29.95 per month! http://sbc.yahoo.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] mysql_num_rows
Try: ($select_total_rows == 0) instead. That and maybe echo $select_total_rows; to see what it's returning. --- Mike Tuller [EMAIL PROTECTED] wrote: I can't get mysql_num_rows to work for some reason. Here is a snippet of what I have $department_name = $_POST['department_name']; $select_query = SELECT * WHERE department_name = '$department_name'; $select_result = mysql_query($select_query, $db_connect); $select_total_rows = mysql_num_rows($select_result); if ($select_total_rows1) { $insert_query = insert into departments (department_name) values ('$department_name'); mysql_query($insert_query, $db_connect) or die (mysql_error()); __ Do you Yahoo!? Yahoo! Tax Center - File online, calculators, forms, and more http://tax.yahoo.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] mysql_num_rows
oh and your SQL statement is wrong: SELECT * FROM table WHERE you are missing the FROM... --- Mike Tuller [EMAIL PROTECTED] wrote: I can't get mysql_num_rows to work for some reason. Here is a snippet of what I have $department_name = $_POST['department_name']; $select_query = SELECT * WHERE department_name = '$department_name'; $select_result = mysql_query($select_query, $db_connect); $select_total_rows = mysql_num_rows($select_result); if ($select_total_rows1) { $insert_query = insert into departments (department_name) values ('$department_name'); mysql_query($insert_query, $db_connect) or die (mysql_error()); I am getting back an error mysql_num_rows(): supplied argument is not a valid MySQL result resource. I have looked over it again and again, and can't see what is wrong. Can anyone else see where the problem might be? Mike -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php __ Do you Yahoo!? Yahoo! Tax Center - File online, calculators, forms, and more http://tax.yahoo.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] File management system
Anyone have a good recommendation for a file management system that would allow the average person to browse certain files/directory on a web server and possibly make edits. Then the front-end would sort of catalog those files and index them so the web user could browse/search and open the files? Something like: Category1: file1 --- this file contains blah blah blah file2 --- this article talks about blah Category2 So maybe if there was a way to tack on categories and descriptions to files, that would be nice. I found phpCommander or something like that after looking through tons of applications on hotscripts, most were junk. It's fine for looking at folders/files and editing, but there's nothing to catalog or display the files on a front-end. So I'm looking for good recommendations. Thanks in advance! __ Do you Yahoo!? Yahoo! Platinum - Watch CBS' NCAA March Madness, live on your desktop! http://platinum.yahoo.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] File management system
Yeah I think I've seen that one... looking for a php/mysql solution if possible. Thanks! --- Mike [EMAIL PROTECTED] wrote: Webmin has some good stuff. (it's a java applet though...) On Thu, 2003-03-20 at 06:14, J J wrote: Anyone have a good recommendation for a file management system that would allow the average person to browse certain files/directory on a web server and possibly make edits. Then the front-end would sort of catalog those files and index them so the web user could browse/search and open the files? Something like: Category1: file1 --- this file contains blah blah blah file2 --- this article talks about blah Category2 So maybe if there was a way to tack on categories and descriptions to files, that would be nice. I found phpCommander or something like that after looking through tons of applications on hotscripts, most were junk. It's fine for looking at folders/files and editing, but there's nothing to catalog or display the files on a front-end. So I'm looking for good recommendations. Thanks in advance! __ Do you Yahoo!? Yahoo! Platinum - Watch CBS' NCAA March Madness, live on your desktop! http://platinum.yahoo.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Mailing list/message board combination?
Is there something available that acts as both a message board and mailing list where: - users can interact via email online (mailing list) with all message being stored in message board format for web browsing - users can reply and create new discussions via the web message board which also sends to the mailing list Users could subscribe/unsubscribe to lists like normal mailing lists. A PHP/MYSQL solution would be great, or maybe a front-end that ties into qmail/majordomo, something like that. I found http://mailgust.phpoutsourcing.com/ but it's just getting underway. Does anyone know of another application like this? __ Do you Yahoo!? Yahoo! Web Hosting - establish your business online http://webhosting.yahoo.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] What solution to use for mass newsletter mailing reporting?
What do you use for mass newsletter mailing say for 5000+ members every month? At the same time, I'd like to be able to track who opened the message, any links they clicked inside the message, bounced messages, etc. I keep seeing reports that PHP/mail have trouble sending more than a few hundred messages depending on the machine. But for mass mailings you get into majordomo, etc, which seems to bulky for my needs. Any thoughts or suggestions on possible solutions? Thank you in advance! __ Do you Yahoo!? Yahoo! Tax Center - forms, calculators, tips, more http://taxes.yahoo.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] What solution to use for mass newsletter mailing reporting?
Interesting way of tracking everything... and I like the idea of the pop-up being able to query the database for current status. For now, I'm firing off a process with no timeout and it can run even after browser abort... but no real way to check on it other than I send a mailing complete type email with some of the mailing details. I was able to send 250 emails within 15 seconds, so roughly 1000 a minute. Not sure if this is because the server load is light, or the server is just that powerful. Does this seem right??? I'd like to find out more how you handle the bounce backs. Again, thanks for the great information. --- Lowell Allen [EMAIL PROTECTED] wrote: - It takes several minutes to send hundreds of emails, so it's best done in the background. You'll need PHP available to run as a CGI/CLI called from a cron tab. - My solution is part of a content management system. Site administrators create the body of the email from database info. When a user hits the send button, the email is saved to a MySQL table which has fields for Time (time created), ListSize (number of addresses), Invalids (bad address formats), Attempts, and InProgress (an enum field used as a flag). There are lots more fields for storing parts of the message, etc., but that's not important to the approach. There's also a database table for storing the email address list, with fields for Time (same as the message table), Valid (valid format), Failed, Attempted, and TimeAttempted. __ Do you Yahoo!? Yahoo! Tax Center - forms, calculators, tips, more http://taxes.yahoo.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] PHP Majordomo -- front end or reporting tools?
I'm looking for something possibly already done in PHP to manage majordomo mailing lists. Also, if there's a way to read some log files and do some reporting ie: - how many messages sent - how many bounced etc Is this possible with PHP or does anyone know of a sample like this to get started? __ Do you Yahoo!? Yahoo! Tax Center - forms, calculators, tips, more http://taxes.yahoo.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] WYSIWYG Content Management system?
I've seen CMS systems like phpnuke but it's kind of overkill for what I need and almost more news like. I'm looking for something that would allow the user to change content, change/upload images, all in a wysiwyg style so it's easy to see and use. It'd be cool to be able to login to the admin area, select a page to edit, and it would allow you to preview the page just like it looks. Then you click on a text area or image you want to update. Is there a CMS that allows for WYSIWYG like editing but will work within specified headers/footers, style sheets, etc? Then the site content would all be generated on the fly from php/mysql. Thanks for any suggestions or tips. __ Do you Yahoo!? Yahoo! Mail Plus - Powerful. Affordable. Sign up now. http://mailplus.yahoo.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php