RE: [PHP] Text from Excel csv file loaded into MySQL table

2006-10-16 Thread KermodeBear
Hello, Can anyone point me to a really good end to end tutorial on extracting text from an Excel csv file and uploading it into MySQL via a PHP script? Actually, depending on the integrity of the data and the consistency of the format in the CSV file, you can do this simply and

RE: [PHP] Iteration through letter

2006-09-14 Thread KermodeBear
What surprised me was the output, which looked like this: A B C [...] Y Z AA AB AC [...] YY YZ I don't have any idea how these letters get printed out, so I'd appreciate any guesses or explanations. http://www.php.net/manual/en/language.operators.increment.php -- PHP General Mailing

RE: [PHP] Variable of current function call?

2006-09-08 Thread KermodeBear
While I'm inside a function call, is it possible to know what function is currently being called? Yes. http://us2.php.net/debug_backtrace -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

RE: [PHP] Capturing System output

2006-08-15 Thread KermodeBear
Hello, If you are working on a Linux system, you can try appending: 21 To the end of your command, so that you end up with: Mysql -u $user -p{$pass} 21 What this does is tell the shell to redirect anything from stderr to go through stdout. If you want to get -really- fancy you can use

RE: [PHP] Creating custom superglobals

2006-08-14 Thread KermodeBear
Hello, You CAN create custom superglobals, but it requires that you have RunKit enabled: http://us3.php.net/runkit HTH, K. Bear -Original Message- From: Stut [mailto:[EMAIL PROTECTED] Sent: Monday, August 14, 2006 10:04 AM To: Ville Mattila Cc: php-general@lists.php.net Subject:

RE: [PHP] Re: Including Google Ads

2006-08-10 Thread KermodeBear
I do not want to include it only but to be able to set the keywords for the add. You do not define that. Google scans your pages and shows relevant ads according to your pages content. Actually, you can. I'm doing this for an advertising system with the company I work for right now. You set

RE: [PHP] Re: Including Google Ads

2006-08-10 Thread KermodeBear
Modifying Google's javascript code even in the slightest (such as messing around with variables) is against the AdSense terms of service, and is a good way to get your account revoked really fast. Only premium publishers that get express permission from Google are allowed to mess with

RE: [PHP] Is this really a pdf?

2006-08-08 Thread KermodeBear
If your server has the appropriate programs installed, there ARE some command line utilities that can take a PDF and convert it to another form; You can execute them with an exec call. Theoretically, if the PDF is corrupt they will print out some kind of error which you can capture. It could also

RE: [PHP] Return Values Copied? Copied if By Reference?

2006-07-27 Thread KermodeBear
Robert Cummings wrote: Then how come when I do a foreach on an array (without modifying anything within the foreach), it still makes a copy of the array that consumes memory? I think it's dangerous to generalize that it's always best to let PHP make copies of things. In the foreach situation,

RE: [PHP] Basic PHP knowledge test

2006-07-19 Thread KermodeBear
Does anyone have any links/resources for a basic php knowledge test? If not, I'll have to write one from scratch myself, and mess up the rest of my day of goofing off/sleeping. It wouldn't hurt to pick up one of those Zend PHP Certification study guides and pull some things from there.

[PHP] List Nastiness (Was: RE: [PHP] Zend Studio, phpMyAdmin, and mysql.sock)

2006-07-14 Thread KermodeBear
Thanks Mr. Rasmussen. (o: To the rest: There has been quite a bit of mean spiritedness on the list lately. I don't know if it is the weather, some strange astrological phenomenon, or something else entirely, but can we tone it down a bit? There has been way too much flame war-esque behavior

RE: [PHP] Debugging Log

2006-07-12 Thread KermodeBear
http://pear.php.net/package/Log/ works well for me. Supports writing messages to files, to a separate window via JavaScript, probably syslog as well as a few others. -Original Message- From: Michael B Allen [mailto:[EMAIL PROTECTED] Sent: Wednesday, July 12, 2006 2:02 PM To:

RE: [PHP] require_once and E_WARNING?

2006-07-06 Thread KermodeBear
chris smith wrote: try it with a call to an undefined function e.g.: $foo = thisFunctionDoesNotExistAtLeastItHadBetterNot(); When this is done, the error handler doesn't get called at all, and the script simply dies with an error message (which could be a bug as well, but might also be

RE: [PHP] Problem using fgetcsv()

2006-07-06 Thread KermodeBear
I am using the fgetcsv() function to read and into an array and update a database. It works great except for the odd record. After investigating, I have ascertained that it is due to a backslash character in the data which fgetcsv() cannot parse properly. I don;t see anyway around this

RE: [PHP] global class instance

2006-07-05 Thread KermodeBear
hi all, i wonder if there is a way of creating an instance of a class and reach it direcly from any scope in PHP4. basically what i want is: i don't want to: - declare global $foo, - use pre-defined $GLOBALS variable, - or use a::print thanks. Static is your friend.

RE: [PHP] Templates, PHP Frameworks, and DB Abstraction?

2006-06-30 Thread KermodeBear
Finally, does anyone have any suggestions for a good PHP database abstraction library? PHP5 has PDO for database abstraction; check the manual for information on that one. If you're stuck with PHP4 then PEAR has several offerings: http://pear.php.net/package/DB/

Re: [PHP] Update site through email

2006-06-29 Thread KermodeBear
Hello, At my last job there were several companies that would send us text invoices by email. These email accounts were on a Linux box, and when the mail would come in the message was sent to scripts via STDIN. I'm not sure HOW it was done but I know that it CAN be done. I would be concerned

RE: [PHP] Re: Re: creating a threaded message system--sorting messages

2006-06-29 Thread KermodeBear
Sounds like that darn Hierarchial Data again. Give this a read and see if it helps you out at all. In particular, you may find the area 'Finding the Depth of the Nodes' helpful. http://dev.mysql.com/tech-resources/articles/hierarchical-data.html Hope it helps, -K.Bear -- PHP General Mailing

RE: [PHP] Re: creating a threaded message system--sorting messages

2006-06-29 Thread KermodeBear
Hello, As Adam pointed out, this can be deadly to your database, especially as the number of posts grows. If you want to go that route, I would recommend selecting all the posts in that particular thread and sorting the data out in PHP somehow. No need to slam your database with (potentially)

RE: [PHP] Re: Question about constructors and destructors

2006-06-28 Thread KermodeBear
For all to know This bug is linux AND windows, the problem is caused when you have the zend.ze1_compatibility_mode = On in the php.ini file. This is a bug that was reported before several times without having been resolved. I commented and reactiveated the bug on the php bug submission

RE: [PHP] Better way of doing this? (menu and submenus)

2006-06-21 Thread KermodeBear
Hello, There is an EXCELLENT article at MySQL.com that talks about storing hierarchal data, which is exactly what you want to do. The theory is not MySQL specific, so you can apply it to any database system. It covers two techniques, one of which Philip Thompson covered, and another that I

Re: [PHP] Word file to PDF

2005-02-25 Thread kermodebear
Hello Kevin, You might want to try this: Run PHP on a windows platform that has MSWord and the PDF printing libraries installed. Use PHP's COM support to load an MSWord object and see if you can get it to load the word document and print it out as a PDF file. Once it is printed to the file, you

Re: [PHP] Dynamic/runtime object creation

2005-02-17 Thread kermodebear
Hello Joe, If you are careful, you can build a string of PHP and eval() it to create a new class definition. I've done this before, but it was for the novelty more than needed to actually use it. I know for a fact that I have seen several projects for this on the web; However, I tried doing a

Re: [PHP] The length of midi

2005-02-16 Thread kermodebear
You may find this to be useful: http://www.google.com/search?hl=enq=PHP+MIDI -KBear Original Message Follows: Hi, Does anybody know how to determine the length (in seconds) of midi melody? -- s pozdravem Bronislav Klucka --=[ pro2-soft.com ]=-- http://pro2-soft.com

[PHP] PHP4: Using create_function to create an object method

2004-12-23 Thread kermodebear
Hello all, I was playing with create_function the other day and found that it is not possible to use create_function to create a method for an object. Code example: ?php $test = create_function( '', 'echo Testing;' ); $test(); // will work $t = 'test'; ${$t}(); // will work $o = new

[PHP] Re: PHP parse Excel and Access files

2004-12-20 Thread kermodebear
There does appear to be a PEAR-based Excel reader located at: http://devel.akbkhome.com/svn/index.php/akpear/Spreadsheet_Excel_Reader/ However, I have not used it and cannot comment on its functionality. Good luck! -KBear Kioto wrote: How to read and get data from Excel Files and Access