[PHP] Need help in Advance PHP!
Hello Friends, I have developed bunch of websites using PHP and I think I can say I can write programs in PHP with database fairly easily. Now I am going to develop a website, something similar to ebay or Yahoo-auctions and I want to know, is there any advanced features that I can use to develop this site. Basically I am trying to learn more about PHP, so I use these developments as a tool. If not, could you please give a url where I can look for advanced PHP features (I use php.net all the time). Thank you so much for your time. -Unni -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Class Question
Hello, This is the first time I write OOP in PHP. I wrote a small class for Mysql and from the index.php, I am calling the new function. I have a display before new class and I have a display after the new and only the display I am getting is the before class and after that there is no error. Is there any thing I should know before using the class? I have the class in a protected directory and index.php in the main directory. and the class is host = hostname; $this->db_name = dbname; $this->uid = uid; $this->pwd = pwd; $link = @mysql_db_connect($host, $uid, $pwd); } //*** run the query *** function run($query) { $this->number_of_columns = 0; $this->number_of_rows = 0; $this->return_code = 0; $this->error_info = ""; $this->result = @mysql_db_query($db_name, $query, $link); if(!$result) { echo "Query didn't run"; echo @mysql_error(); $error_info = @mysql_error(); } else { $number_of_columns = @mysql_num_fields($result); $number_of_rows = @mysql_num_rows($result); $error_info = ""; }//end of bad return code return $return_code; }// end of run query function //* extract or fetch a row ** function get_values() { $this->row = @mysql_fetch_object($result); if($row) { extract($row); $return_code = 0; } else { $return_code = -1; }// end of if }//end of get_values function }//end of class ?> -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Is there a user group in Colorado?
Is there a user group in Colorado? Thanks -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP]include question, WHY doesn't this work...
Is the lib direcotory under the working directory, I mean, if your program is excuting under temp directory, the lib directory has to be below temp directory. If you are running this program from the root directory then lib has to be below root directory. Your code looks good to me. One more thing I can think of is, do you read access to lib directory, just curious. Chris Cocuzzo wrote: > hey- > > I have a piece of code which does a simply INSERT query into an mp3 table. > I've tested it out, and it completes the query, however there is one bug > that I just have no clue about. > > this code does not work when i try to connect to the db: > include("lib/db_config.php"); > > $connection = db_connect("fplg"); > if(!connection) { > die(sql_error()); > } > the include fails and so the db_connect function is undefined. > > this code works: > include("db_config.php"); > > $connection = db_connect("fplg"); > if(!connection) { > die(sql_error()); > } > > I DO have a directory called lib in my root folder. am I calling the include > wrong in that first piece. Note that I also tried the first one with a > foward slash in front of the 'lib', but had no luck. > > help! > chris > > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] PHP, Excel, .CSV's, and Regular Expressions Help Needed!
Hi Jeff, I didn't get your question. Can you elobrate little bit more, if possible? What is the input and what is output you are expecting and what do you want to do in the process? Thanks. Jeff Lacy wrote: > Hello Everyone, > > A client of mine is working with excel, and I need to move the data from > excel to something php can deal with a little better. Naturally, I figured > using .csv would be easiest, but I am running into several problems.I > can get around them, but I need a regular expression (and I am NOT good at > writing those). > > I'm not quite sure how I should explain what the regular expression ought to > do, so I am giving an example of the data ought to look like in php (after > the regular expressions), and how it looks in the .csv. > > NOTE: I am exploding the data, so all ,'s must be changed into COMMA's. > > +---++ > | php | .cvs > | > +---++ > piCOMMA 3.14,hey is for horses"pi, 3.14",hey is for horses > "byeCOMMA bye",ciaoCOMMA ciao"""bye, bye""", "ciao, ciao" > "good morning,I'm Bob """good morning", I'm Bob > sleep is good,IceCOMMACOMMAsleep is good,"Ice,," > > > If those four examples aren't enough, please let me know. I am NOT on the > php mailing list, so PLEASE send messages to me ([EMAIL PROTECTED] AND > to [EMAIL PROTECTED]). > > Thank you very much (in advance), > > Jeff > > > > > > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Example high-profile PHP sites
If every one is giving their website about mine http://www.malayalamovies.com Chad Day wrote: > How about my site.. http://www.bangable.com > > Might not be the kind of site you want to put on your list, but we do get a > lot of traffic.. 4 million page views a month. All PHP/mysql. > > Chad > > -Original Message- > From: Maurice Rickard [mailto:[EMAIL PROTECTED]] > Sent: Thursday, July 26, 2001 12:36 PM > To: [EMAIL PROTECTED] > Subject: [PHP] Example high-profile PHP sites > > > For a number of reasons, I need to offer a client a list of big, > impressive-sounding, high-profile sites using PHP. I went looking > for the list on PHP.net, and the closest I could find is > http://pt2.php.net/sites.php which, as you'll see, is suffering from > a fatal error. > > I did find a list at http://php.datalogica.com/sites.php which, while > helpful, seems a bit dated. Does anyone have some favorite examples > that aren't on this list? > > I've been preparing other arguments as well, but the "all the cool > people are doing it" examples will help. > > Thanks! > -- > Maurice Rickard > http://mauricerickard.com/ > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > To contact the list administrators, e-mail: [EMAIL PROTECTED] > > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] substr question...
try $filename=explode(".", names); echo $filename[0] Jeff Lewis wrote: > I am trying to receive file names but can't quite figure out the proper substr to do >it: > > jeff.dat > jeffrey.dat > chris.dat > tom.dat > > I want to receive the name to the left of the .dat > > Jeff > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] my php script is very slow. help?
If you are using DB queries a lot, try to use LIMIT, this will save lot of your time. Tom Carter wrote: > Do you have many DB queries? What is the average size of the result > returned? > > have you tried running timing functions on it to get a measure of how long > the page is taking? theres many examples on the web.. > > You can also use these to calculate the time for different sections.. that > should help you work out what is taking the time. > > HTH,Tom > >> >> Hi all >> >> I have Linux/PHP/MySQL. Some of my script really run >> very slowly. painfully slow. All data are fetched from >> the database. The tables in database are indexed. >> Still some scripts are very slow. I am using nested >> while and for loops. Any idea how to make them faster? >> >> What should I avoid in my scripting? >> >> thanks all >> >> >> Do You Yahoo!? >> Get your free @yahoo.co.uk address at http://mail.yahoo.co.uk >> or your free @yahoo.ie address at http://mail.yahoo.ie >> >> -- >> PHP General Mailing List (http://www.php.net/) >> To unsubscribe, e-mail: [EMAIL PROTECTED] >> For additional commands, e-mail: [EMAIL PROTECTED] >> To contact the list administrators, e-mail: [EMAIL PROTECTED] >> -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] MySQL big table process
Try LIMIT in the select Plamen Slavov wrote: > Hi guys, > I have a big MySQL table - about 300MB > I want to get all the records from the table, make certain transformations and write >them to a text file (i can not use "select into outfile...) > the problem is when i type "select * from " the server hangs > is there a way that i can select 1 record at a time or something similar, which >would not put so much pressure on the server, but i still will get every record from >the table > Thanks > -- > Visit our site at http://eshop.bg > > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] A Basic Question!
Hello, This is a very basic question. My server admin said, the PHP is available in the server to use it. PHP3 available in the server and PHP4 is available as CGI-Wrapper. Now my question is, how can I make use of PHP4 over riding PHP3? Thanks. -Unni -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] flat file from ?
Textarea is also a veriable Write a the file with $textVar value thats it. Gary wrote: > Hello All, > I am still kinda new to php. I know how to write/create a flat file but > how would I write to a flat file from a form object ? > > TIA > Gary > > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] A Basic Question!
Hi Hth, I just tried two programs with the same name to display echo phpinfo(). One with php3 extention and another with php extention and both brings in php 3.0.12 Is there anything else I should check? Thanks in advance. -Unni Kurt Lieber wrote: > If it's set up according to defaults, a file named .php will be > processed by php4 and one named .php3 will be processed by php3. > > You can test this out by creating two files, one with a .php extension > and one with a .php3 extension. Then, just place an "echo phpInfo();" > in the file and you'll see which version each file gets processed by. > > hth > > --kurt > >> -Original Message- >> From: Unni [mailto:[EMAIL PROTECTED]] >> Sent: Friday, July 27, 2001 8:58 AM >> To: Php (E-mail) (E-mail) >> Subject: [PHP] A Basic Question! >> >> >> Hello, >> >> This is a very basic question. My server admin said, the PHP is >> available in the server to use it. PHP3 available in the >> server and PHP4 >> is available as CGI-Wrapper. Now my question is, how can I >> make use of >> PHP4 over riding PHP3? >> >> Thanks. >> -Unni >> >> >> -- >> PHP General Mailing List (http://www.php.net/) >> To unsubscribe, e-mail: [EMAIL PROTECTED] >> For additional commands, e-mail: >> [EMAIL PROTECTED] To contact the list >> administrators, e-mail: [EMAIL PROTECTED] >> >> -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]