Re: [PHP-DB] Problem with mail function
On Tuesday 15 January 2002 10:53, olinux wrote: > Is there a solution to this if you do not have edit > access to the php.ini file? [ie. a shared server] A number of the settings in php.ini can be set/altered from within your script. Check out ini_set() and friends. -- Jason Wong -> Gremlins Associates -> www.gremlins.com.hk /* Let us live!!! Let us love!!! Let us share the deepest secrets of our souls!!! You first. */ -- PHP Database 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-DB] Optimizing mail()
Just came across this post and wondered if anyone has done this - if so can you share some code? The idea is to order emails by the mailservers Would you just order the emails by domain name? [that would group all aol.com, msn.com, yahoo.com emails] http://www.faqts.com/knowledge_base/view.phtml/aid/300/fid/21 Thanks, olinux __ Do You Yahoo!? Send FREE video emails in Yahoo! Mail! http://promo.yahoo.com/videomail/ -- PHP Database 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-DB] Problem with mail function
Is there a solution to this if you do not have edit access to the php.ini file? [ie. a shared server] I found this function that seems to be a solution. What would the proper use be? ignore_user_abort(TRUE); ??? http://www.php.net/manual/en/function.ignore-user-abort.php http://www.phpbuilder.com/tips/item.php?id=125 olinux --- [EMAIL PROTECTED] wrote: > Hi, Faye. There's a parm in the configuration file > (php.ini) cleverly > called "max_execution_time". Its default setting is > 30. There's also a > "set_time_limit()" function that allows massaging > this variable. > > Does this help? > > On Mon, 14 Jan 2002, Faye Keesic wrote: > > > Don't know anything about ole 30 second timeout... > what does it do? > > > > I checked out phpbuilder, and tried the sleep > function after each loop > > iteration (didn't seem to work), so now am trying > to send out the headlines > > in groups of 50... > > > > Sounds like others have the same problem. mail() > is a php weakness??? > > > > -- > > Faye Keesic > > Computer Programmer Analyst/Web Page Design > > > > >> From: [EMAIL PROTECTED] > > >> Date: Mon, 14 Jan 2002 09:51:54 -0800 (PST) > > >> To: Faye Keesic <[EMAIL PROTECTED]> > > >> Cc: [EMAIL PROTECTED] > > >> Subject: Re: [PHP-DB] Problem with mail > function > > >> > > >> Is it the ole 30-second timeout thang? > Changeable in php.ini? > > >> > > >> On Mon, 14 Jan 2002, Faye Keesic wrote: > > >> > > >>> Hi there... > > >>> > > >>> I have a problem mailing out approx. 180 > emails (no attachments) using the > > >>> mail() php function. I loop through the email > table once, sending the email > > >>> to everyone in the list. > > >>> > > >>> The problem is that my page seems to time out > when I send the emails, and it > > >>> refreshes itself. So if I don't manually stop > the browser after say, 10 > > >>> seconds, the recipients in the email table get > the email more than one time. > > >>> > > >>> Maybe I shouldn't be trying to send that many > emails at a time. I am on > > >>> apache using mysql and php... > > >>> -- > > >>> Faye Keesic > > >>> Computer Programmer Analyst/Web Page Design > > >>> > > >>> > > >>> -- > > >>> PHP Database 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 Database 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 Database 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] > __ Do You Yahoo!? Send FREE video emails in Yahoo! Mail! http://promo.yahoo.com/videomail/ -- PHP Database 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-DB] Re: Help! SQL 2000 and cursors
I just tried installing MDAC 2.7 on my SQL Server, based on another user's recommendation. That didn't resolve the problem. Any other ideas? Thanks, Pat "Patrick Brown" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > I've been running a PHP4 script on a Linux server every day for quite a > while now. All of a sudden, it stops working. The error message is: > > [ODBC SQL Server Driver][SQL Server]The cursor was not declared. > > What does this mean and how can I fix it? Nothing has changed as far as I > know. Nobody else has access. > > Here is the SQL statement that generates the error: > > $sql = "SELECT acctid, invoicedate, paiddate, annualdate, reminder, memtype > FROM tblAccounting WHERE InvoiceDate = '" . $filterdate . "') AND (reminder > < 3) AND (PaidDate IS NULL OR PaidDate <= '" . $filteryear . "') ORDER BY > acctid"; > > The server is a Redhat Linux server with PHP compiled standalone. It gets to > the SQL Server via the Easysoft OOB software. > > Thanks, > Pat > > -- PHP Database 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-DB] Help! SQL 2000 and cursors
I've been running a PHP4 script on a Linux server every day for quite a while now. All of a sudden, it stops working. The error message is: [ODBC SQL Server Driver][SQL Server]The cursor was not declared. What does this mean and how can I fix it? Nothing has changed as far as I know. Nobody else has access. Here is the SQL statement that generates the error: $sql = "SELECT acctid, invoicedate, paiddate, annualdate, reminder, memtype FROM tblAccounting WHERE InvoiceDate = '" . $filterdate . "') AND (reminder < 3) AND (PaidDate IS NULL OR PaidDate <= '" . $filteryear . "') ORDER BY acctid"; The server is a Redhat Linux server with PHP compiled standalone. It gets to the SQL Server via the Easysoft OOB software. Thanks, Pat -- PHP Database 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-DB] Problem with mail function
Hi, Faye. There's a parm in the configuration file (php.ini) cleverly called "max_execution_time". Its default setting is 30. There's also a "set_time_limit()" function that allows massaging this variable. Does this help? On Mon, 14 Jan 2002, Faye Keesic wrote: > Don't know anything about ole 30 second timeout... what does it do? > > I checked out phpbuilder, and tried the sleep function after each loop > iteration (didn't seem to work), so now am trying to send out the headlines > in groups of 50... > > Sounds like others have the same problem. mail() is a php weakness??? > > -- > Faye Keesic > Computer Programmer Analyst/Web Page Design > > >> From: [EMAIL PROTECTED] > >> Date: Mon, 14 Jan 2002 09:51:54 -0800 (PST) > >> To: Faye Keesic <[EMAIL PROTECTED]> > >> Cc: [EMAIL PROTECTED] > >> Subject: Re: [PHP-DB] Problem with mail function > >> > >> Is it the ole 30-second timeout thang? Changeable in php.ini? > >> > >> On Mon, 14 Jan 2002, Faye Keesic wrote: > >> > >>> Hi there... > >>> > >>> I have a problem mailing out approx. 180 emails (no attachments) using the > >>> mail() php function. I loop through the email table once, sending the email > >>> to everyone in the list. > >>> > >>> The problem is that my page seems to time out when I send the emails, and it > >>> refreshes itself. So if I don't manually stop the browser after say, 10 > >>> seconds, the recipients in the email table get the email more than one time. > >>> > >>> Maybe I shouldn't be trying to send that many emails at a time. I am on > >>> apache using mysql and php... > >>> -- > >>> Faye Keesic > >>> Computer Programmer Analyst/Web Page Design > >>> > >>> > >>> -- > >>> PHP Database 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 Database 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 Database 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-DB] what is the result index? (Mysql)
Hello, I'm running a select-query and getting this warning: -- Warning: Unable to jump to row 100 on MySQL result index 2 -- I know the reason for the warning, but what exactly does this number two mean? The query is in een for-loop and the resultnumber rises by 2. Best regards, Bas -- PHP Database 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-DB] Problem with mail function
Don't know anything about ole 30 second timeout... what does it do? I checked out phpbuilder, and tried the sleep function after each loop iteration (didn't seem to work), so now am trying to send out the headlines in groups of 50... Sounds like others have the same problem. mail() is a php weakness??? -- Faye Keesic Computer Programmer Analyst/Web Page Design >> From: [EMAIL PROTECTED] >> Date: Mon, 14 Jan 2002 09:51:54 -0800 (PST) >> To: Faye Keesic <[EMAIL PROTECTED]> >> Cc: [EMAIL PROTECTED] >> Subject: Re: [PHP-DB] Problem with mail function >> >> Is it the ole 30-second timeout thang? Changeable in php.ini? >> >> On Mon, 14 Jan 2002, Faye Keesic wrote: >> >>> Hi there... >>> >>> I have a problem mailing out approx. 180 emails (no attachments) using the >>> mail() php function. I loop through the email table once, sending the email >>> to everyone in the list. >>> >>> The problem is that my page seems to time out when I send the emails, and it >>> refreshes itself. So if I don't manually stop the browser after say, 10 >>> seconds, the recipients in the email table get the email more than one time. >>> >>> Maybe I shouldn't be trying to send that many emails at a time. I am on >>> apache using mysql and php... >>> -- >>> Faye Keesic >>> Computer Programmer Analyst/Web Page Design >>> >>> >>> -- >>> PHP Database 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 Database 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-DB] The New Guy
Paul, Just a clarification: I wasn't the original poster. Christopher J. Crane was the original asker of the CSV/flat file database question. I do have a db to use. Cheers, db Paul Burney wrote: > on 1/14/02 2:12 PM, Daniel Barton at [EMAIL PROTECTED] appended the following > bits to my mbox: > > > Well maybe I should just go out and join that perl list. > > I was going to respond to you but I didn't have a good answer. :) > > I don't know of any built in PHP functions that do what you are looking to > do. There are some special fgets-type functions for use with CSV, but > nothing that treats it as SQL. > > You might want to try the PEAR repository to see if they have anything, but > I'm not hopeful. > > For those of you who aren't familiar with it, the Perl DBI::CSV module > allows you to use a CSV file as a simple SQL database. Very nice if you > don't have a real database to work with (which in this case, Mr. Barton > doesn't). > > I was at a workshop by Randal Schwartz where he showed a bit of how to use > it. Very cool... > > If you can't get the clients to go for the extra cost, I'd recommend going > with Perl. Choose the best tool for the job at hand, TMTOWTDI. > > Paul > > while ($self != "asleep") { > $sheep_count++; > } > ?> > > -- > PHP Database 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] -- -- Dan Barton Terrestrial Program Biologist Asst. Data Manager Point Reyes Bird Observatory http://www.prbo.org [EMAIL PROTECTED] [EMAIL PROTECTED] -- PHP Database 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-DB] The New Guy
People, people! I wish we could all just get along. ;^) I did have a problem understanding the exact question. My response was a little off-target owing to ambiguity. Also, I did read (or participate in) the other threads mentioned by Mr. Neil, (aka "Mr anti-Guru basher.") Sincerely, "Mr anti-Newbie Basher" db p.s. I'm on a couple of perl lists. apologies for being WAY off-subject. DL Neil wrote: > In another thread there's a comment about "newbie bashing", the author now gets to >see that there are always two > sides to a story! > > Christopher: I notice that you have found it necessary to explain your rationale for >"They do not want to pay > the extra amount of money for a MySQL database". The fact that you felt it necessary >to expand on your earlier > statement illustrates an ambiguity/short-coming in the original. You were >responsible for that. How did Daniel > qualify for the blame? > > I also notice that you have not had the courtesy to comment on my own response to >your first post, and the other > confusing statement/ambiguity "A lot of my work is on unix system that people want >to work with Access." The > implication behind your post was that you only received responses concerned with the >cost of MySQL. This is not > true. You do however say "None the answers had anything to do with the question I >asked" which indicates you > either didn't read what I said, or failed to understand it. > > It is not fun to spend time attempting to help someone, and then find that not only >were your comments a waste > of time, but the questioner wants to argue or to replace good manners with rudeness >(and you are not the first > to have done so in the last few days - FYI Mr anti-Newbie Basher). > > If you have a problem with people on this list, please do unsubscribe (quietly). If >you prefer the company of > others, please do take Dan's advice. Your experience is contrary to my own, and is >NOT supported by the majority > as evidenced by the volume of list transactions. > > =dn > > - Original Message - > From: "Daniel Barton" <[EMAIL PROTECTED]> > To: "Christopher J. Crane" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> > Sent: 14 January 2002 19:12 > Subject: Re: [PHP-DB] The New Guy > > > Well maybe I should just go out and join that perl list. > > > > "Christopher J. Crane" wrote: > > > > > It's not that MySQL is not free, I know that and I am using iton my > > > development servers. The problem is some of the work I do is for clients > > > that do not have their own server. So their site is hosted by a company and > > > most of these companies charge extra for a MySQL database. > > > > > > This is the second answer I got about MySQL being free. None the answers had > > > anything to do with the question I asked. The people at the perl lists are > > > so much more helpful and direct with the answers someone seeks. > > > - Original Message - > > > From: "Daniel Barton" <[EMAIL PROTECTED]> > > > To: "Christopher J. Crane" <[EMAIL PROTECTED]> > > > Sent: Sunday, January 13, 2002 9:10 PM > > > Subject: Re: [PHP-DB] The New Guy > > > > > > > MySQL is free and open source. Support from MySQL AB is not free, but > > > > that shouldn't be an issue. > > > > > > > > Check out: > > > > > > > > http://www.mysql.com > > > > > > > > for more info. It's a free, fully functional relational database. > > > > > > > > If you mean pay for the hosting of a MySQL database..?? > > > > > > > > -db > > > > > > > > "Christopher J. Crane" wrote: > > > > > > > > > I do a lot of work with Perl and have decided to see what this PHP is > > > all > > > > > about. The best way for me to do that, is to just do a project. Here is > > > what > > > > > I am looking to do. I would like to use PHP and the SQL language on a > > > CSV or > > > > > Flat File Database. A lot of my work is on unix system that people want > > > to > > > > > work with Access. They do not want to pay the extra amount of money fora > > > > > MySQL database. The answer to this issue is access with exports to CSV > > > files > > > > > for some of the simplier stuff like shopping carts and members and stuff > > > > > like that. > > > > > > > > > > Here's the thing, can PHP interact with a flat file databse like perl > > > and > > > > > the DBD::CSV? If so can someone point me in the right idrection to get > > > > > started. I have a server for development and it now has 4.0 PHP. > > > > > > > > > > -- > > > > > PHP Database 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] > > > > > > > > -- > > > > -- > > > > Dan Barton > > > > Terrestrial Program Biologist > > > > Asst. Data Manager > > > > Point Reyes Bird Observatory > > > > http://www.prbo.org > > > > [EMAIL PROTECTED] > > > > [EMAIL PROTECTED] > > > > > > > > > > > > > > > > -- > > -- > > Dan Barton >
Re: [PHP-DB] any good web hosting with php and mysql support?
On 14 Jan 2002, at 13:17, Gurhan Ozen wrote: > I am currently looking for a reliable web host to host my personal > website. > I know there are millions of web hosting companies that have PHP and > MYSQL support but I just can't trust any of the fully-assured and > IS there anyone who have web sites hosted at webhosting service for a > reasonably long time without any problems? IF yes, can you please > contact me and tell me about it? This might be kind of off-topic for > both lists, and i apologize to both lists, so you might want to reply > to my email rather than sending it to list(s). If you get a lot of responses you might consider writing up something nice which someone might put in a FAQ (although it may be dated). Would, by chance, you want telnet access to your server? I could not imagine any other way. You can write cron jobs to restart your database if it goes down, etc. I began using a company called iserver.com way back in 1995 and I've been using them ever since, even after they were bought by Verio. The only way you can get more control is by having a dedicated box. Pricing starts at US$55.00 a month and up but you might try one of their resellers. I worked for Summit Communications (http://www.summitdesign.net/) and they give me a discount from the retail price. Details on what you get are here: http://www.viaverio.com/products/vps.cfm I've heard there is a linux package which provides the same sort of "sandbox" environment but I don't know anyone selling it. I've seen hordes of hosting where they expect me to talk to my database from a script ... never, I like to pipe commands and just work in the client from time to time. Peter Good Perl5/mod_perl/Apache/RDBMS/Unix developer seeking telecommuting work call 901-652-2002 or email [EMAIL PROTECTED] -- PHP Database 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-DB] The New Guy
on 1/14/02 2:12 PM, Daniel Barton at [EMAIL PROTECTED] appended the following bits to my mbox: > Well maybe I should just go out and join that perl list. I was going to respond to you but I didn't have a good answer. :) I don't know of any built in PHP functions that do what you are looking to do. There are some special fgets-type functions for use with CSV, but nothing that treats it as SQL. You might want to try the PEAR repository to see if they have anything, but I'm not hopeful. For those of you who aren't familiar with it, the Perl DBI::CSV module allows you to use a CSV file as a simple SQL database. Very nice if you don't have a real database to work with (which in this case, Mr. Barton doesn't). I was at a workshop by Randal Schwartz where he showed a bit of how to use it. Very cool... If you can't get the clients to go for the extra cost, I'd recommend going with Perl. Choose the best tool for the job at hand, TMTOWTDI. Paul -- PHP Database 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-DB] The New Guy
In another thread there's a comment about "newbie bashing", the author now gets to see that there are always two sides to a story! Christopher: I notice that you have found it necessary to explain your rationale for "They do not want to pay the extra amount of money for a MySQL database". The fact that you felt it necessary to expand on your earlier statement illustrates an ambiguity/short-coming in the original. You were responsible for that. How did Daniel qualify for the blame? I also notice that you have not had the courtesy to comment on my own response to your first post, and the other confusing statement/ambiguity "A lot of my work is on unix system that people want to work with Access." The implication behind your post was that you only received responses concerned with the cost of MySQL. This is not true. You do however say "None the answers had anything to do with the question I asked" which indicates you either didn't read what I said, or failed to understand it. It is not fun to spend time attempting to help someone, and then find that not only were your comments a waste of time, but the questioner wants to argue or to replace good manners with rudeness (and you are not the first to have done so in the last few days - FYI Mr anti-Newbie Basher). If you have a problem with people on this list, please do unsubscribe (quietly). If you prefer the company of others, please do take Dan's advice. Your experience is contrary to my own, and is NOT supported by the majority as evidenced by the volume of list transactions. =dn - Original Message - From: "Daniel Barton" <[EMAIL PROTECTED]> To: "Christopher J. Crane" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> Sent: 14 January 2002 19:12 Subject: Re: [PHP-DB] The New Guy > Well maybe I should just go out and join that perl list. > > "Christopher J. Crane" wrote: > > > It's not that MySQL is not free, I know that and I am using iton my > > development servers. The problem is some of the work I do is for clients > > that do not have their own server. So their site is hosted by a company and > > most of these companies charge extra for a MySQL database. > > > > This is the second answer I got about MySQL being free. None the answers had > > anything to do with the question I asked. The people at the perl lists are > > so much more helpful and direct with the answers someone seeks. > > - Original Message - > > From: "Daniel Barton" <[EMAIL PROTECTED]> > > To: "Christopher J. Crane" <[EMAIL PROTECTED]> > > Sent: Sunday, January 13, 2002 9:10 PM > > Subject: Re: [PHP-DB] The New Guy > > > > > MySQL is free and open source. Support from MySQL AB is not free, but > > > that shouldn't be an issue. > > > > > > Check out: > > > > > > http://www.mysql.com > > > > > > for more info. It's a free, fully functional relational database. > > > > > > If you mean pay for the hosting of a MySQL database..?? > > > > > > -db > > > > > > "Christopher J. Crane" wrote: > > > > > > > I do a lot of work with Perl and have decided to see what this PHP is > > all > > > > about. The best way for me to do that, is to just do a project. Here is > > what > > > > I am looking to do. I would like to use PHP and the SQL language on a > > CSV or > > > > Flat File Database. A lot of my work is on unix system that people want > > to > > > > work with Access. They do not want to pay the extra amount of money fora > > > > MySQL database. The answer to this issue is access with exports to CSV > > files > > > > for some of the simplier stuff like shopping carts and members and stuff > > > > like that. > > > > > > > > Here's the thing, can PHP interact with a flat file databse like perl > > and > > > > the DBD::CSV? If so can someone point me in the right idrection to get > > > > started. I have a server for development and it now has 4.0 PHP. > > > > > > > > -- > > > > PHP Database 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] > > > > > > -- > > > -- > > > Dan Barton > > > Terrestrial Program Biologist > > > Asst. Data Manager > > > Point Reyes Bird Observatory > > > http://www.prbo.org > > > [EMAIL PROTECTED] > > > [EMAIL PROTECTED] > > > > > > > > > > > -- > -- > Dan Barton > Terrestrial Program Biologist > Asst. Data Manager > Point Reyes Bird Observatory > http://www.prbo.org > [EMAIL PROTECTED] > [EMAIL PROTECTED] > > > > -- > PHP Database 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 Database 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-DB] The New Guy
Well maybe I should just go out and join that perl list. "Christopher J. Crane" wrote: > It's not that MySQL is not free, I know that and I am using iton my > development servers. The problem is some of the work I do is for clients > that do not have their own server. So their site is hosted by a company and > most of these companies charge extra for a MySQL database. > > This is the second answer I got about MySQL being free. None the answers had > anything to do with the question I asked. The people at the perl lists are > so much more helpful and direct with the answers someone seeks. > - Original Message - > From: "Daniel Barton" <[EMAIL PROTECTED]> > To: "Christopher J. Crane" <[EMAIL PROTECTED]> > Sent: Sunday, January 13, 2002 9:10 PM > Subject: Re: [PHP-DB] The New Guy > > > MySQL is free and open source. Support from MySQL AB is not free, but > > that shouldn't be an issue. > > > > Check out: > > > > http://www.mysql.com > > > > for more info. It's a free, fully functional relational database. > > > > If you mean pay for the hosting of a MySQL database..?? > > > > -db > > > > "Christopher J. Crane" wrote: > > > > > I do a lot of work with Perl and have decided to see what this PHP is > all > > > about. The best way for me to do that, is to just do a project. Here is > what > > > I am looking to do. I would like to use PHP and the SQL language on a > CSV or > > > Flat File Database. A lot of my work is on unix system that people want > to > > > work with Access. They do not want to pay the extra amount of money fora > > > MySQL database. The answer to this issue is access with exports to CSV > files > > > for some of the simplier stuff like shopping carts and members and stuff > > > like that. > > > > > > Here's the thing, can PHP interact with a flat file databse like perl > and > > > the DBD::CSV? If so can someone point me in the right idrection to get > > > started. I have a server for development and it now has 4.0 PHP. > > > > > > -- > > > PHP Database 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] > > > > -- > > -- > > Dan Barton > > Terrestrial Program Biologist > > Asst. Data Manager > > Point Reyes Bird Observatory > > http://www.prbo.org > > [EMAIL PROTECTED] > > [EMAIL PROTECTED] > > > > > > -- -- Dan Barton Terrestrial Program Biologist Asst. Data Manager Point Reyes Bird Observatory http://www.prbo.org [EMAIL PROTECTED] [EMAIL PROTECTED] -- PHP Database 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-DB] Why the following error, yet it works anyway
Rick Emery <[EMAIL PROTECTED]> wrote on 01/14/2002 10:35:37 AM: > First, if "$submit" is not set, then the "delete" statement will be > executed. This will not return an array upon which mysql_fetch_array() will > act. Therefore $result will not be valid. I made this change: if (!isset($submit)): $sql = "select news_id, bulletin_subject from dbulletins"; elseif (isset($submit)): $sql = "delete from dbulletins where news_id = '$newsid'"; endif; but still get the same error. Shouldn't this fix the problem so now it will return the database list because the submit button is not pushed (on returning to the page)? -- Chip > -Original Message- > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] > Sent: Monday, January 14, 2002 11:18 AM > To: [EMAIL PROTECTED] > Subject: [PHP-DB] Why the following error, yet it works anyway > > I have the following short web page to delete dealer bulletins from a > database. My page lists > all the bulletins in the database - id and subject. There is a text input > field to enter the bulletin > id number and hit the delete button, and the bulletin is deleted. It works > except after the submit > delete I get an error - > - > Warning: Supplied argument is not a valid MySQL result resource in > /usr/local/apache/htdocs/bulletin_delete.php on line 35 > - > line 35 is the while statement. > > Here is the complete page - > - > > > > Dealer Bulletins, Simrad, Inc > > > Simrad Dealer Bulletins - Delete Screen > NOTE: This is a permanent and > irreversible > delete! No second chances here! > > > Enter the bulleting ID Number: > > > $db = mysql_connect("localhost", "root") > or die ("Can't get the database server"); > mysql_select_db("bulletins", $db) or die ("Can't get the database"); > if (isset($submit)): > $sql = "delete from dbulletins where news_id = '$newsid'"; > else: > $sql = "select news_id, bulletin_subject from dbulletins"; > endif; > $result = mysql_query($sql); > while ($row = mysql_fetch_array($result)) > { > print "\nDelete entry > ".$row["news_id"]."? " > .$row["bulletin_subject"]."\n\n"; > } > ?> > > > Back > > > > -- > Chip Wiegand > Computer Services > Simrad, Inc > www.simrad.com > [EMAIL PROTECTED] > > "There is no reason anyone would want a computer in their home." > --Ken Olson, president, chairman and founder of Digital Equipment > Corporation, 1977 > (They why do I have 7? Somebody help me!) > > -- > PHP Database 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-DB] any good web hosting with php and mysql support?
Go to www.webhostingtalk.com this is forum about hosting services. _ Valery Vlasyuk http://www.cgi-network.net - Original Message - From: "Shannon Kendrick" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Cc: <[EMAIL PROTECTED]> Sent: Monday, January 14, 2002 8:43 PM Subject: RE: [PHP-DB] any good web hosting with php and mysql support? > Ive got numerous accounts with www.palmversa.com and I > have to say they are very reliable and extremely > cheap. > > Hope this helps > > Shannon > > > > > > > -- > > > PHP Database 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] > > > > > - > > Before posting, please check: > >http://www.mysql.com/manual.php (the manual) > >http://lists.mysql.com/ (the list > > archive) > > > > To request this thread, e-mail > > <[EMAIL PROTECTED]> > > To unsubscribe, e-mail > > > <[EMAIL PROTECTED]> > > Trouble unsubscribing? Try: > > http://lists.mysql.com/php/unsubscribe.php > > > > > __ > Do You Yahoo!? > Send FREE video emails in Yahoo! Mail! > http://promo.yahoo.com/videomail/ > > - > Before posting, please check: >http://www.mysql.com/manual.php (the manual) >http://lists.mysql.com/ (the list archive) > > To request this thread, e-mail <[EMAIL PROTECTED]> > To unsubscribe, e-mail <[EMAIL PROTECTED]> > Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php > > -- PHP Database 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-DB] any good web hosting with php and mysql support?
In my previous email, I mentioned that http://www.nomonthlyfees.com provided 500 megs of disk space per account. I host several a domains by redirecting domains (5) to sub-directories within that 500. I don't have a 500-meg account for each domain. After the first year, the 500-megs cost $70/year. rick Richard Emery IT Sr. Project Manager (972) 478-3398 >-- Original Message -- >From: Gurhan Ozen <[EMAIL PROTECTED]> >Date: Mon, 14 Jan 2002 13:17:59 -0500 > > Hi All, > I am currently looking for a reliable web host to host my personal website. >I know there are millions of web hosting companies that have PHP and MYSQL >support but I just can't trust any of the fully-assured and confident >webhosting ads anymore. I would like to get a service from a company for >which someone can vouch. > I did started hosting my web site at a webhoster that promised 99.99% >uptime and my site is hardly ever up and running. They don't answer my >emails either. > IS there anyone who have web sites hosted at webhosting service for a >reasonably long time without any problems? IF yes, can you please contact me >and tell me about it? This might be kind of off-topic for both lists, and i >apologize to both lists, so you might want to reply to my email rather than >sending it to list(s). > Thank you very much. > >Gurhan > > - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php -- PHP Database 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-DB] any good web hosting with php and mysql support? (OT)
Starting @ $20.00/month http://www.ocsny.com > >-- Original Message -- >From: Gurhan Ozen <[EMAIL PROTECTED]> >Date: Mon, 14 Jan 2002 13:17:59 -0500 > > Hi All, > I am currently looking for a reliable web host to host my personal website. >I know there are millions of web hosting companies that have PHP and MYSQL >support but I just can't trust any of the fully-assured and confident >webhosting ads anymore. I would like to get a service from a company for >which someone can vouch. > I did started hosting my web site at a webhoster that promised 99.99% >uptime and my site is hardly ever up and running. They don't answer my >emails either. > IS there anyone who have web sites hosted at webhosting service for a >reasonably long time without any problems? IF yes, can you please contact me >and tell me about it? This might be kind of off-topic for both lists, and i >apologize to both lists, so you might want to reply to my email rather than >sending it to list(s). > Thank you very much. > >Gurhan > > -- PHP Database 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-DB] ADDING DATES
People, people: In general, I do agree, that when a post starts with " ... but i am getting lazy" I find it a little lazy. Well, it even claims to be lazy. However, there have been a bunch of instances of newbie-attacks on this list lately, and if that's the type of environment this is going to end up creating, I might as well unsubscribe right now. I generally try to ignore messages that make me "get a bit peeved," not lash out at the people who write them. There have been a few instances where I posted a meaningful question, and no one took the time to answer. Perhaps because we're too busy responding (negatively or positively) to simpler questions, or maybe because Mercury was in retrograde. Made me figure it out myself (which is an excellent thing.) But yes, not only RTFM, download a copy of it. Wallpaper your house with it. Burn it on CD and distribute it to your friends. Sell it on the street for $1 (or euro). Make a php site mirror in your closet. Read the last 5 messages on the list that have "date" in the title. Type "php adding dates" into google. Sell guns to third-world countries to finance your php-support-question habit, and pay Zend and MySQL AB to answer your questions. Read Julie Meloni articles when you're on the can. Sit on the beach and ponder more efficient ways to addslashes() and stripslashes() using functions. There's tons of resources out there. my two cents. -db DL Neil wrote: > Hear, hear! > =dn > > > Yep, maybe it is, but when a post starts with " ... but i am getting lazy", > > I get a bit peeved. The implication is "Do my work for me." > > > > It's different when the context is I want to do this ... tried this ... > > results aren't right ... please help. > > > > Miles > > > > At 06:04 PM 1/13/2002 -0800, Daniel Barton wrote: > > >Miles, > > >Hmm... "RTFM!" .. > > >That's a pretty unproductive post. > > > > > >Pedro, > > >There are two PHP functions that will suffice. date() and mktime(). > > > > > >I've cut and pasted this from the PHP manual: > > > > > >$tomorrow = mktime (0,0,0,date("m") ,date("d")+1,date("Y")); > > >$lastmonth = mktime (0,0,0,date("m")-1,date("d"), date("Y")); > > >$nextyear = mktime (0,0,0,date("m"), date("d"), date("Y")+1); > > > > > >That should do the trick. > > > > > >-db > > > > > >Miles Thompson wrote: > > > > > > > RTFM! > > > > > > > > At 12:17 AM 1/14/2002 +, Pedro M. S. Oliveira wrote: > > > > > > > > >Hi all, first of all i'm sorry to ask this but i am getting lazy and i bet > > > > >you all can answer me in a couple of code lines. > > > > >i want to add some days to the the result of the date php function. > > > > >how can i had lets say 3 days? > > > > >ex: > > > > >(pseudo code) > > > > > > > > > > > > > >$date =date(,mm,dd); > > > > >$date =date(,mm,dd) + 3days; > > > > >echo $date; > > > > >echo "thank you all"; > > > > >?> > > > > > > > > > >Thanks > > > > >Pedro > > > > > > > > > > > > > > >-- > > > > >PHP Database 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 Database 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] > > > > > >-- > > >-- > > >Dan Barton > > >Terrestrial Program Biologist > > >Asst. Data Manager > > >Point Reyes Bird Observatory > > >http://www.prbo.org > > >[EMAIL PROTECTED] > > >[EMAIL PROTECTED] > > > > > > -- > > PHP Database 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 Database 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] -- -- Dan Barton Terrestrial Program Biologist Asst. Data Manager Point Reyes Bird Observatory http://www.prbo.org [EMAIL PROTECTED] [EMAIL PROTECTED] -- PHP Database 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-DB] Why the following error, yet it works anyway
First, if "$submit" is not set, then the "delete" statement will be executed. This will not return an array upon which mysql_fetch_array() will act. Therefore $result will not be valid. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Monday, January 14, 2002 11:18 AM To: [EMAIL PROTECTED] Subject: [PHP-DB] Why the following error, yet it works anyway I have the following short web page to delete dealer bulletins from a database. My page lists all the bulletins in the database - id and subject. There is a text input field to enter the bulletin id number and hit the delete button, and the bulletin is deleted. It works except after the submit delete I get an error - - Warning: Supplied argument is not a valid MySQL result resource in /usr/local/apache/htdocs/bulletin_delete.php on line 35 - line 35 is the while statement. Here is the complete page - - Dealer Bulletins, Simrad, Inc Simrad Dealer Bulletins - Delete Screen NOTE: This is a permanent and irreversible delete! No second chances here! Enter the bulleting ID Number: \nDelete entry ".$row["news_id"]."? " .$row["bulletin_subject"]."\n\n"; } ?> Back -- Chip Wiegand Computer Services Simrad, Inc www.simrad.com [EMAIL PROTECTED] "There is no reason anyone would want a computer in their home." --Ken Olson, president, chairman and founder of Digital Equipment Corporation, 1977 (They why do I have 7? Somebody help me!) -- PHP Database 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-DB] any good web hosting with php and mysql support?
I use FGDesigner.com. They have proven to be quite reliable and have a wide range of plans available based on what you would need. You can check out the website. My husband and I have been hosting our site through them for a couple of years and never had any problems. I also know that they have PHP support because I was asking about it recently. I am pretty sure that they have MySQL support too - I can't be positive because I don't use MySQL. Good luck finding someone! -Natalie > -Original Message- > From: Gurhan Ozen [SMTP:[EMAIL PROTECTED]] > Sent: Monday, January 14, 2002 1:18 PM > To: [EMAIL PROTECTED] > Cc: [EMAIL PROTECTED] > Subject: [PHP-DB] any good web hosting with php and mysql support? > > Hi All, > I am currently looking for a reliable web host to host my personal > website. > I know there are millions of web hosting companies that have PHP and MYSQL > support but I just can't trust any of the fully-assured and confident > webhosting ads anymore. I would like to get a service from a company for > which someone can vouch. > I did started hosting my web site at a webhoster that promised 99.99% > uptime and my site is hardly ever up and running. They don't answer my > emails either. > IS there anyone who have web sites hosted at webhosting service for a > reasonably long time without any problems? IF yes, can you please contact > me > and tell me about it? This might be kind of off-topic for both lists, and > i > apologize to both lists, so you might want to reply to my email rather > than > sending it to list(s). > Thank you very much. > > Gurhan > > > -- > PHP Database 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 Database 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-DB] RE: LIMIT and get_num_rows
I just realized, I think that indices may not avail you when you're doing a search based on double-sided wildcards. I'm afraid you may be forcing a full table-scan by performing that kind of search. So run a few benchmark tests. Maybe populate a test database with a large volume (like 100,000 rows or more) so you'll notice performance differences, and then run a few tests. Cheers, -Peter -- PHP Database 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-DB] any good web hosting with php and mysql support?
I use http://www.nomonthly fees.com Initial buy-in is $200. However, that includes domain name registration, 500 megs of disks pace, 5 giga-bytes of band-width per month. Complete PHP and MYSQL support. Bunch of other stuff too, like 1000 POP3 email boxes, PGP, shopping carts, etc. After first year, it's $70 per year ( $6/month) -Original Message- From: Gurhan Ozen [mailto:[EMAIL PROTECTED]] Sent: Monday, January 14, 2002 12:18 PM To: [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Subject: [PHP-DB] any good web hosting with php and mysql support? Hi All, I am currently looking for a reliable web host to host my personal website. I know there are millions of web hosting companies that have PHP and MYSQL support but I just can't trust any of the fully-assured and confident webhosting ads anymore. I would like to get a service from a company for which someone can vouch. I did started hosting my web site at a webhoster that promised 99.99% uptime and my site is hardly ever up and running. They don't answer my emails either. IS there anyone who have web sites hosted at webhosting service for a reasonably long time without any problems? IF yes, can you please contact me and tell me about it? This might be kind of off-topic for both lists, and i apologize to both lists, so you might want to reply to my email rather than sending it to list(s). Thank you very much. Gurhan -- PHP Database 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 Database 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-DB] any good web hosting with php and mysql support?
Try www.aletiahosting.com $9.95 a month -- Original Message -- From: Gurhan Ozen <[EMAIL PROTECTED]> Date: Mon, 14 Jan 2002 13:17:59 -0500 Hi All, I am currently looking for a reliable web host to host my personal website. I know there are millions of web hosting companies that have PHP and MYSQL support but I just can't trust any of the fully-assured and confident webhosting ads anymore. I would like to get a service from a company for which someone can vouch. I did started hosting my web site at a webhoster that promised 99.99% uptime and my site is hardly ever up and running. They don't answer my emails either. IS there anyone who have web sites hosted at webhosting service for a reasonably long time without any problems? IF yes, can you please contact me and tell me about it? This might be kind of off-topic for both lists, and i apologize to both lists, so you might want to reply to my email rather than sending it to list(s). Thank you very much. Gurhan -- PHP Database 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 Database 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-DB] any good web hosting with php and mysql support?
Hi All, I am currently looking for a reliable web host to host my personal website. I know there are millions of web hosting companies that have PHP and MYSQL support but I just can't trust any of the fully-assured and confident webhosting ads anymore. I would like to get a service from a company for which someone can vouch. I did started hosting my web site at a webhoster that promised 99.99% uptime and my site is hardly ever up and running. They don't answer my emails either. IS there anyone who have web sites hosted at webhosting service for a reasonably long time without any problems? IF yes, can you please contact me and tell me about it? This might be kind of off-topic for both lists, and i apologize to both lists, so you might want to reply to my email rather than sending it to list(s). Thank you very much. Gurhan -- PHP Database 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-DB] Re: Tricky Quiestion!!!
Ok i got here: When i type the ecrypted msg oomoeogoao ohooomoeo it types out omega hmeo code: elseif($cmd=="@") { $sep=substr($enc,0,1); $denc=explode($sep,$enc); for($i=0;$i $enc:$dencf"); } -- PHP Database 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-DB] Problem with mail function
Is it the ole 30-second timeout thang? Changeable in php.ini? On Mon, 14 Jan 2002, Faye Keesic wrote: > Hi there... > > I have a problem mailing out approx. 180 emails (no attachments) using the > mail() php function. I loop through the email table once, sending the email > to everyone in the list. > > The problem is that my page seems to time out when I send the emails, and it > refreshes itself. So if I don't manually stop the browser after say, 10 > seconds, the recipients in the email table get the email more than one time. > > Maybe I shouldn't be trying to send that many emails at a time. I am on > apache using mysql and php... > -- > Faye Keesic > Computer Programmer Analyst/Web Page Design > > > -- > PHP Database 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 Database 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-DB] Breaking strings up
$var = explode(",","120,120,122"); -Original Message- From: Thomas "omega" Henning [mailto:[EMAIL PROTECTED]] Sent: Monday, January 14, 2002 11:14 AM To: [EMAIL PROTECTED] Subject: [PHP-DB] Breaking strings up Hello, I saw here somewhere a functions that breakes up a string at a nother string like "120,120,122" and break up at "," and it would result $var[0]="120"; $var[1]="120"; $var[2]="122"; Thanks for the info -- PHP Database 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 Database 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-DB] Tricky Quiestion!!!
Hello all, I encrypt a text lets say omega home with an home made encryption algorithm. Lets say i encrypt omega home. It will result oomoeogoao ohooomoeo. When i decrypt it it ses omega hme Home isn't typed out due 2 exlopde("o","oomoeogoao ohooomoeo"); In this case. H My quiestion how i make the PHP code put the first char in this case o in its right place? Thomas "omega" Henning ok this is my code elseif($cmd=="@") { $sep=substr($enc,0,1); $denc=explode($sep,$enc); for($i=0;$i $enc:$dencf"); } -- PHP Database 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-DB] Why the following error, yet it works anyway
I have the following short web page to delete dealer bulletins from a database. My page lists all the bulletins in the database - id and subject. There is a text input field to enter the bulletin id number and hit the delete button, and the bulletin is deleted. It works except after the submit delete I get an error - - Warning: Supplied argument is not a valid MySQL result resource in /usr/local/apache/htdocs/bulletin_delete.php on line 35 - line 35 is the while statement. Here is the complete page - - Dealer Bulletins, Simrad, Inc Simrad Dealer Bulletins - Delete Screen NOTE: This is a permanent and irreversible delete! No second chances here! Enter the bulleting ID Number: \nDelete entry ".$row["news_id"]."? " .$row["bulletin_subject"]."\n\n"; } ?> Back -- Chip Wiegand Computer Services Simrad, Inc www.simrad.com [EMAIL PROTECTED] "There is no reason anyone would want a computer in their home." --Ken Olson, president, chairman and founder of Digital Equipment Corporation, 1977 (They why do I have 7? Somebody help me!)
[PHP-DB] Breaking strings up
Hello, I saw here somewhere a functions that breakes up a string at a nother string like "120,120,122" and break up at "," and it would result $var[0]="120"; $var[1]="120"; $var[2]="122"; Thanks for the info -- PHP Database 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-DB] Problem with mail function
Hi there... I have a problem mailing out approx. 180 emails (no attachments) using the mail() php function. I loop through the email table once, sending the email to everyone in the list. The problem is that my page seems to time out when I send the emails, and it refreshes itself. So if I don't manually stop the browser after say, 10 seconds, the recipients in the email table get the email more than one time. Maybe I shouldn't be trying to send that many emails at a time. I am on apache using mysql and php... -- Faye Keesic Computer Programmer Analyst/Web Page Design -- PHP Database 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-DB] WebMail
Hi, I'm looking for a good web based email client (preferably easy to setup and done in PHP of course). We have a sendmail server that works great. I'm not sure how the webmail systems work though. Can I use a different Apache server or do I have to setup the PHP webmail on the actual mail server? I guess I have 2 questions, what's a good webmail program, and 2nd what's the basic setup of this all? Thanks for any help, Mike Dolan TWR Group, Inc. 690-B Alpha Drive Cleveland, Ohio 44143 Ph: 800-684-3141 Fx: 440-684-7002 http://www.twrgroup.com
[PHP-DB] outfile permission error
I'm trying to create a new file on my server from the data in a table. When I do the query it returns a permission error. I'm logged into my server through a telnet sessions and the permissions on the dir allow me to write to it. Here is the query below. mysql> select * into outfile "/home/u1/me/www.somesite.com/catalogreq/ catalog.txt" -> fields terminated by ',' optionally enclosed by '"' -> lines terminated by "\n" -> FROM catalogs; ERROR 1045: Access denied for user: 'me@localhost' (Using password: YES) Any help you be great!! This really has me and my server admin confused. -- PHP Database 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-DB] grabbing id from new record
Sam, Thanks, I got the mysql_insert_id() tip a few seconds earlier. However, my alternative method (which I will now drop in the interests of efficiency) is perfectly safe. It is impossible for the same user to go and create another record in that verys small interim period between the two queries. That was why the WHERE user='$user' was there. George - Original Message - From: "Sam Masiello" <[EMAIL PROTECTED]> To: "George Pitcher" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> Sent: Monday, January 14, 2002 3:21 PM Subject: Re: [PHP-DB] grabbing id from new record > > That actually isn't a safe way to do it. Consider the following scenario: > > Insert A occurs generating row Y in your table. > Insert B occurs generating row Z in your table. > select occurs (after insert A) to grab last ID inserted...your result is the > ID from row Z. > select occurs (after insert B), and your result again is the result ID from > row Z. > > So, in both cases you will get the ID from insert B, instead of your > intended result (first select gives the ID from row Y and the second from > row Z). > > You didn't mention which database engine that you are using, so I will > assume you are using MySQL. There is a function called mysql_insert_id() > that will give you the answer that you are looking for. You can find more > information about it here: > http://www.php.net/manual/en/function.mysql-insert-id.php > > HTH > > Sam Masiello > Software Quality Assurance Engineer > Synacor > (716) 853-1362 X289 > [EMAIL PROTECTED] > > - Original Message - > From: "George Pitcher" <[EMAIL PROTECTED]> > To: <[EMAIL PROTECTED]> > Sent: Monday, January 14, 2002 9:23 AM > Subject: [PHP-DB] grabbing id from new record > > > > Hi, > > > > Is there a way to grab the ID (from ID field) while INSERTing a new > record? > > > > I am currently doing a separate INSERT then a SELECT query to find the > most > > recently added record by that user: > > > > select ID from table where user = '$user' order by ID DESC limit 0,1 > > > > This does the trick but it may not be the most efficient way. > > > > George > > > > > > --- > > Outgoing mail is certified Virus Free. > > Checked by AVG anti-virus system (http://www.grisoft.com). > > Version: 6.0.307 / Virus Database: 168 - Release Date: 11/12/01 > > > > > > _ > > Do You Yahoo!? > > Get your free @yahoo.com address at http://mail.yahoo.com > > > > > > -- > > PHP Database 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] > > --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.307 / Virus Database: 168 - Release Date: 11/12/01 _ Do You Yahoo!? Get your free @yahoo.com address at http://mail.yahoo.com -- PHP Database 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-DB] grabbing id from new record
That actually isn't a safe way to do it. Consider the following scenario: Insert A occurs generating row Y in your table. Insert B occurs generating row Z in your table. select occurs (after insert A) to grab last ID inserted...your result is the ID from row Z. select occurs (after insert B), and your result again is the result ID from row Z. So, in both cases you will get the ID from insert B, instead of your intended result (first select gives the ID from row Y and the second from row Z). You didn't mention which database engine that you are using, so I will assume you are using MySQL. There is a function called mysql_insert_id() that will give you the answer that you are looking for. You can find more information about it here: http://www.php.net/manual/en/function.mysql-insert-id.php HTH Sam Masiello Software Quality Assurance Engineer Synacor (716) 853-1362 X289 [EMAIL PROTECTED] - Original Message - From: "George Pitcher" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Monday, January 14, 2002 9:23 AM Subject: [PHP-DB] grabbing id from new record > Hi, > > Is there a way to grab the ID (from ID field) while INSERTing a new record? > > I am currently doing a separate INSERT then a SELECT query to find the most > recently added record by that user: > > select ID from table where user = '$user' order by ID DESC limit 0,1 > > This does the trick but it may not be the most efficient way. > > George > > > --- > Outgoing mail is certified Virus Free. > Checked by AVG anti-virus system (http://www.grisoft.com). > Version: 6.0.307 / Virus Database: 168 - Release Date: 11/12/01 > > > _ > Do You Yahoo!? > Get your free @yahoo.com address at http://mail.yahoo.com > > > -- > PHP Database 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 Database 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-DB] grabbing id from new record
Thanks, just what I was looking for. George - Original Message - From: "matt stewart" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Monday, January 14, 2002 3:26 PM Subject: RE: [PHP-DB] grabbing id from new record > straight after you do the insert command, use the call: > $ID = mysql_insert_id(); > > The $ID is now the primary key for the record you just inserted. > > > -Original Message- > From: George Pitcher [mailto:[EMAIL PROTECTED]] > Sent: 14 January 2002 14:56 > To: Ireneusz Piasecki; [EMAIL PROTECTED] > Subject: Re: [PHP-DB] grabbing id from new record > > > I am sorry, I was not clear in my original request. > > The id is auto-incremented. I want to grab the id so that I can use it as > part of a redirect > > > $q2="select Course_ID from course where HEI_ID = '$inst' order by Course_ID > desc limit 0,1"; > $result2=mysql_query($q2) or die("q2 failed"); > while ($row = mysql_fetch_array ($result2)) > { > $recid=$row['Course_ID']; > } > $redirect=('Location: http://localhost/Mysite/itemlist.php?recid=' . > $recid); > header($redirect); > > As I said, it works but maybe there's a better way. > > George > > > What about Auto_increemnt field ?? > > Your's id can be auto_increment field. for example: > > create table dupencja (id int(7) auto_increment not null, primary > key(id)); > > > > so when you insert records: > > insert into dupencja values('') - > id will be 1 > > insert into dupencja values('') - > id will be 2 > > > > this is auto_increment, so your trick isn't need. > > > > More in manula of mysql. > > regards. > > I piasecki - www.b-c.pl > > > > > > > > > > - Original Message - > > From: "George Pitcher" <[EMAIL PROTECTED]> > > To: <[EMAIL PROTECTED]> > > Sent: Monday, January 14, 2002 3:23 PM > > Subject: [PHP-DB] grabbing id from new record > > > > > > > Hi, > > > > > > Is there a way to grab the ID (from ID field) while INSERTing a new > > record? > > > > > > I am currently doing a separate INSERT then a SELECT query to find the > > most > > > recently added record by that user: > > > > > > select ID from table where user = '$user' order by ID DESC limit 0,1 > > > > > > This does the trick but it may not be the most efficient way. > > > > > > George > > > > > > > > > --- > > > Outgoing mail is certified Virus Free. > > > Checked by AVG anti-virus system (http://www.grisoft.com). > > > Version: 6.0.307 / Virus Database: 168 - Release Date: 11/12/01 > > > > > > > > > _ > > > Do You Yahoo!? > > > Get your free @yahoo.com address at http://mail.yahoo.com > > > > > > > > > -- > > > PHP Database 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] > > > > > > > > > > > -- > > > > Znudzilo Ci sie logo w komorce? > > Wgraj nowe [ http://komorki.onet.pl/dodatki.html ] > > > --- > Outgoing mail is certified Virus Free. > Checked by AVG anti-virus system (http://www.grisoft.com). > Version: 6.0.307 / Virus Database: 168 - Release Date: 11/12/01 > > > _ > Do You Yahoo!? > Get your free @yahoo.com address at http://mail.yahoo.com > > > -- > PHP Database 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] > > --- > Incoming mail is certified Virus Free. > Checked by AVG anti-virus system (http://www.grisoft.com). > Version: 6.0.313 / Virus Database: 174 - Release Date: 02/01/02 > > > --- > Outgoing mail is certified Virus Free. > Checked by AVG anti-virus system (http://www.grisoft.com). > Version: 6.0.313 / Virus Database: 174 - Release Date: 02/01/02 > > > -- > PHP Database 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] --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.307 / Virus Database: 168 - Release Date: 11/12/01 _ Do You Yahoo!? Get your free @yahoo.com address at http://mail.yahoo.com -- PHP Database 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-DB] grabbing id from new record
straight after you do the insert command, use the call: $ID = mysql_insert_id(); The $ID is now the primary key for the record you just inserted. -Original Message- From: George Pitcher [mailto:[EMAIL PROTECTED]] Sent: 14 January 2002 14:56 To: Ireneusz Piasecki; [EMAIL PROTECTED] Subject: Re: [PHP-DB] grabbing id from new record I am sorry, I was not clear in my original request. The id is auto-incremented. I want to grab the id so that I can use it as part of a redirect $q2="select Course_ID from course where HEI_ID = '$inst' order by Course_ID desc limit 0,1"; $result2=mysql_query($q2) or die("q2 failed"); while ($row = mysql_fetch_array ($result2)) { $recid=$row['Course_ID']; } $redirect=('Location: http://localhost/Mysite/itemlist.php?recid=' . $recid); header($redirect); As I said, it works but maybe there's a better way. George > What about Auto_increemnt field ?? > Your's id can be auto_increment field. for example: > create table dupencja (id int(7) auto_increment not null, primary key(id)); > > so when you insert records: > insert into dupencja values('') - > id will be 1 > insert into dupencja values('') - > id will be 2 > > this is auto_increment, so your trick isn't need. > > More in manula of mysql. > regards. > I piasecki - www.b-c.pl > > > > > - Original Message - > From: "George Pitcher" <[EMAIL PROTECTED]> > To: <[EMAIL PROTECTED]> > Sent: Monday, January 14, 2002 3:23 PM > Subject: [PHP-DB] grabbing id from new record > > > > Hi, > > > > Is there a way to grab the ID (from ID field) while INSERTing a new > record? > > > > I am currently doing a separate INSERT then a SELECT query to find the > most > > recently added record by that user: > > > > select ID from table where user = '$user' order by ID DESC limit 0,1 > > > > This does the trick but it may not be the most efficient way. > > > > George > > > > > > --- > > Outgoing mail is certified Virus Free. > > Checked by AVG anti-virus system (http://www.grisoft.com). > > Version: 6.0.307 / Virus Database: 168 - Release Date: 11/12/01 > > > > > > _ > > Do You Yahoo!? > > Get your free @yahoo.com address at http://mail.yahoo.com > > > > > > -- > > PHP Database 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] > > > > > > -- > > Znudzilo Ci sie logo w komorce? > Wgraj nowe [ http://komorki.onet.pl/dodatki.html ] --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.307 / Virus Database: 168 - Release Date: 11/12/01 _ Do You Yahoo!? Get your free @yahoo.com address at http://mail.yahoo.com -- PHP Database 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] --- Incoming mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.313 / Virus Database: 174 - Release Date: 02/01/02 --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.313 / Virus Database: 174 - Release Date: 02/01/02 -- PHP Database 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-DB] grabbing id from new record
I am sorry, I was not clear in my original request. The id is auto-incremented. I want to grab the id so that I can use it as part of a redirect $q2="select Course_ID from course where HEI_ID = '$inst' order by Course_ID desc limit 0,1"; $result2=mysql_query($q2) or die("q2 failed"); while ($row = mysql_fetch_array ($result2)) { $recid=$row['Course_ID']; } $redirect=('Location: http://localhost/Mysite/itemlist.php?recid=' . $recid); header($redirect); As I said, it works but maybe there's a better way. George > What about Auto_increemnt field ?? > Your's id can be auto_increment field. for example: > create table dupencja (id int(7) auto_increment not null, primary key(id)); > > so when you insert records: > insert into dupencja values('') - > id will be 1 > insert into dupencja values('') - > id will be 2 > > this is auto_increment, so your trick isn't need. > > More in manula of mysql. > regards. > I piasecki - www.b-c.pl > > > > > - Original Message - > From: "George Pitcher" <[EMAIL PROTECTED]> > To: <[EMAIL PROTECTED]> > Sent: Monday, January 14, 2002 3:23 PM > Subject: [PHP-DB] grabbing id from new record > > > > Hi, > > > > Is there a way to grab the ID (from ID field) while INSERTing a new > record? > > > > I am currently doing a separate INSERT then a SELECT query to find the > most > > recently added record by that user: > > > > select ID from table where user = '$user' order by ID DESC limit 0,1 > > > > This does the trick but it may not be the most efficient way. > > > > George > > > > > > --- > > Outgoing mail is certified Virus Free. > > Checked by AVG anti-virus system (http://www.grisoft.com). > > Version: 6.0.307 / Virus Database: 168 - Release Date: 11/12/01 > > > > > > _ > > Do You Yahoo!? > > Get your free @yahoo.com address at http://mail.yahoo.com > > > > > > -- > > PHP Database 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] > > > > > > -- > > Znudzilo Ci sie logo w komorce? > Wgraj nowe [ http://komorki.onet.pl/dodatki.html ] --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.307 / Virus Database: 168 - Release Date: 11/12/01 _ Do You Yahoo!? Get your free @yahoo.com address at http://mail.yahoo.com -- PHP Database 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-DB] grabbing id from new record
Hi. What about Auto_increemnt field ?? Your's id can be auto_increment field. for example: create table dupencja (id int(7) auto_increment not null, primary key(id)); so when you insert records: insert into dupencja values('') - > id will be 1 insert into dupencja values('') - > id will be 2 this is auto_increment, so your trick isn't need. More in manula of mysql. regards. I piasecki - www.b-c.pl - Original Message - From: "George Pitcher" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Monday, January 14, 2002 3:23 PM Subject: [PHP-DB] grabbing id from new record > Hi, > > Is there a way to grab the ID (from ID field) while INSERTing a new record? > > I am currently doing a separate INSERT then a SELECT query to find the most > recently added record by that user: > > select ID from table where user = '$user' order by ID DESC limit 0,1 > > This does the trick but it may not be the most efficient way. > > George > > > --- > Outgoing mail is certified Virus Free. > Checked by AVG anti-virus system (http://www.grisoft.com). > Version: 6.0.307 / Virus Database: 168 - Release Date: 11/12/01 > > > _ > Do You Yahoo!? > Get your free @yahoo.com address at http://mail.yahoo.com > > > -- > PHP Database 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] > -- Znudzilo Ci sie logo w komorce? Wgraj nowe [ http://komorki.onet.pl/dodatki.html ] -- PHP Database 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-DB] Re: permissions for writing file
My problem is that I'm trying to run the query via a telnet sessions before I code through PHP. Is there a solution that anyone knows for this? "James Kupernik" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > I'm trying to use PHP and MySQL to query a table and write the contents to a > new file. When run the command to outfile it tells me I don't have > permissions. This is on a Unix machine. > > mysql> select * into outfile > "/home/u1/funfun/www.somewebsite.com/catalogreq/ > catalog.txt" > mysql> fields terminated by ',' optionally enclosed by '"' > mysql> fields terminated by ',' optionally enclosed by '"' > mysql> fields terminated by ',' optionally enclosed by '"' > > > -- PHP Database 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-DB] grabbing id from new record
Hi, Is there a way to grab the ID (from ID field) while INSERTing a new record? I am currently doing a separate INSERT then a SELECT query to find the most recently added record by that user: select ID from table where user = '$user' order by ID DESC limit 0,1 This does the trick but it may not be the most efficient way. George --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.307 / Virus Database: 168 - Release Date: 11/12/01 _ Do You Yahoo!? Get your free @yahoo.com address at http://mail.yahoo.com -- PHP Database 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-DB] RE: LIMIT and get_num_rows
yep, it returns 20. -Original Message- From: DL Neil [mailto:[EMAIL PROTECTED]] Sent: 14 January 2002 14:17 To: matt stewart; [EMAIL PROTECTED] Subject: Re: [PHP-DB] RE: LIMIT and get_num_rows Have you (original post-er) tested performing a SELECT ... LIMIT 0, 20 and then calling mysql_num_rows()? Does it return 20 (the LIMIT) or the number of rows SELECT-ed before/without regard to the limit? =dn - Original Message - From: "matt stewart" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: 14 January 2002 14:05 Subject: RE: [PHP-DB] RE: LIMIT and get_num_rows > you've assumed correctly - so it's definitely faster to do the two queries? > okey dokey, then that's the method i shall use. > thanks to everyone who's added their thoughts! > > -Original Message- > From: Peter Westergaard [mailto:[EMAIL PROTECTED]] > Sent: 14 January 2002 14:01 > To: [EMAIL PROTECTED] > Subject: [PHP-DB] RE: LIMIT and get_num_rows > > > > >but presumably if i'm doing a SELECT count(*) FROM Designs WHERE Keywords > >LIKE "%sport%" > >followed by a SELECT * FROM Designs WHERE Keywords LIKE "%sport%" LIMIT > 0,20 > > > >it's still using nearly as much processing time as just returning all the > >designs and just using a get_num_rows and then only using the first 20? > > I absolutely think it will not. > > After all, the table record count should be able to reference the index, > (you are running this query against an indexed 'Keywords' column yes?), > while assembling the table of returned data will take quite a bit more > memory, which is what you're really trying to cut down, I think. > > Cheers, > -Peter > > > -- > PHP Database 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] > > --- > Incoming mail is certified Virus Free. > Checked by AVG anti-virus system (http://www.grisoft.com). > Version: 6.0.313 / Virus Database: 174 - Release Date: 02/01/02 > > > --- > Outgoing mail is certified Virus Free. > Checked by AVG anti-virus system (http://www.grisoft.com). > Version: 6.0.313 / Virus Database: 174 - Release Date: 02/01/02 > > > -- > PHP Database 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] > > --- Incoming mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.313 / Virus Database: 174 - Release Date: 02/01/02 --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.313 / Virus Database: 174 - Release Date: 02/01/02 -- PHP Database 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-DB] RE: LIMIT and get_num_rows
Have you (original post-er) tested performing a SELECT ... LIMIT 0, 20 and then calling mysql_num_rows()? Does it return 20 (the LIMIT) or the number of rows SELECT-ed before/without regard to the limit? =dn - Original Message - From: "matt stewart" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: 14 January 2002 14:05 Subject: RE: [PHP-DB] RE: LIMIT and get_num_rows > you've assumed correctly - so it's definitely faster to do the two queries? > okey dokey, then that's the method i shall use. > thanks to everyone who's added their thoughts! > > -Original Message- > From: Peter Westergaard [mailto:[EMAIL PROTECTED]] > Sent: 14 January 2002 14:01 > To: [EMAIL PROTECTED] > Subject: [PHP-DB] RE: LIMIT and get_num_rows > > > > >but presumably if i'm doing a SELECT count(*) FROM Designs WHERE Keywords > >LIKE "%sport%" > >followed by a SELECT * FROM Designs WHERE Keywords LIKE "%sport%" LIMIT > 0,20 > > > >it's still using nearly as much processing time as just returning all the > >designs and just using a get_num_rows and then only using the first 20? > > I absolutely think it will not. > > After all, the table record count should be able to reference the index, > (you are running this query against an indexed 'Keywords' column yes?), > while assembling the table of returned data will take quite a bit more > memory, which is what you're really trying to cut down, I think. > > Cheers, > -Peter > > > -- > PHP Database 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] > > --- > Incoming mail is certified Virus Free. > Checked by AVG anti-virus system (http://www.grisoft.com). > Version: 6.0.313 / Virus Database: 174 - Release Date: 02/01/02 > > > --- > Outgoing mail is certified Virus Free. > Checked by AVG anti-virus system (http://www.grisoft.com). > Version: 6.0.313 / Virus Database: 174 - Release Date: 02/01/02 > > > -- > PHP Database 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 Database 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-DB] RE: LIMIT and get_num_rows
you've assumed correctly - so it's definitely faster to do the two queries? okey dokey, then that's the method i shall use. thanks to everyone who's added their thoughts! -Original Message- From: Peter Westergaard [mailto:[EMAIL PROTECTED]] Sent: 14 January 2002 14:01 To: [EMAIL PROTECTED] Subject: [PHP-DB] RE: LIMIT and get_num_rows >but presumably if i'm doing a SELECT count(*) FROM Designs WHERE Keywords >LIKE "%sport%" >followed by a SELECT * FROM Designs WHERE Keywords LIKE "%sport%" LIMIT 0,20 > >it's still using nearly as much processing time as just returning all the >designs and just using a get_num_rows and then only using the first 20? I absolutely think it will not. After all, the table record count should be able to reference the index, (you are running this query against an indexed 'Keywords' column yes?), while assembling the table of returned data will take quite a bit more memory, which is what you're really trying to cut down, I think. Cheers, -Peter -- PHP Database 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] --- Incoming mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.313 / Virus Database: 174 - Release Date: 02/01/02 --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.313 / Virus Database: 174 - Release Date: 02/01/02 -- PHP Database 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-DB] RE: LIMIT and get_num_rows
>but presumably if i'm doing a SELECT count(*) FROM Designs WHERE Keywords >LIKE "%sport%" >followed by a SELECT * FROM Designs WHERE Keywords LIKE "%sport%" LIMIT 0,20 > >it's still using nearly as much processing time as just returning all the >designs and just using a get_num_rows and then only using the first 20? I absolutely think it will not. After all, the table record count should be able to reference the index, (you are running this query against an indexed 'Keywords' column yes?), while assembling the table of returned data will take quite a bit more memory, which is what you're really trying to cut down, I think. Cheers, -Peter -- PHP Database 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-DB] What is REG_BADRPT, and why do I get it?
Hello! I have quite a weird problem. When I use ereg or ereg_replace I get a REG_BADRPT warning, like so : Warning: REG_BADRPT in /var/www/html/mag/search.php on line 35 Warning: REG_BADRPT in /var/www/html/mag/search.php on line 36 The offending lines are if(ereg("*",$search_name)) { ereg_replace("*","%",$search_name); } if(ereg("?",$search_name)) { ereg_replace("?","_",$search_name); } but just two lines above them I have if(ereg("*",$search_id)) { ereg_replace("*","%",$search_id); } if(ereg("?",$search_id)) { ereg_replace("?","_",$search_id); } and two similar lines of code below them, yet PHP doesn't complain about them. Anyone have any ideas as to what's causing the warning? Cheers, Markus -- Markus Lervik Linux-administrator with a kungfoo grip Vaasa City Library - Regional Library [EMAIL PROTECTED] +358-6-325 3589 / +358-40-832 6709 -- PHP Database 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-DB] RE: permissions for writing file
>I'm trying to use PHP and MySQL to query a table and write the contents to a >new file. When run the command to outfile it tells me I don't have >permissions. This is on a Unix machine. I haven't run this on Unix myself, but I think this answer might be useful. Someone please correct me if I'm out to lunch. Check which user account is actually running the PHP process (or the Apache process if it's not the CGI). Then ensure that it (the PHP user) has the rights to create files in the specified directory. Be careful here though, because you will be giving malicious visitors more tools to work with. Cheers, -Peter -- PHP Database 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-DB] RE: phpMyAdmin - blank screen?
>hallo guys! > >i'm a newbie in php..I've installed phpMyAdmin on my pc, together with MySQL >and Apache with PHP 4 on Win98. > >the index.php page is blank! any ideas/suggestions from u ppl? > >gracias! Can you post some of the code from your index.php? Have you installed it all correctly, ie placed index.php in your document root and configured Apache to work with PHP? I've personally had it all running on Win98 before so I know it's doable. just might take some tweaking! Cheers, -Peter -- PHP Database 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-DB] permissions for writing file
I'm trying to use PHP and MySQL to query a table and write the contents to a new file. When run the command to outfile it tells me I don't have permissions. This is on a Unix machine. mysql> select * into outfile "/home/u1/funfun/www.somewebsite.com/catalogreq/ catalog.txt" mysql> fields terminated by ',' optionally enclosed by '"' mysql> fields terminated by ',' optionally enclosed by '"' mysql> fields terminated by ',' optionally enclosed by '"' -- PHP Database 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-DB] MySQL/Gemini now free - any feedback??
Hi Just noticed that NuSphere are now including the Gemini table type in their free binary download. It seems that everything is there, apart from the online backup, which is only available in the commercial version. I need transactions, and took a look at InnoDB. But it seems to have some pretty serious drawbacks, such as fixed table sizes, not being able to provide cardinality info to count(*), a manual that assumes you have a PHD in database application programming etc. The Gemini table is based on an enterprise proven Progress embedded database engine, and would seem the way to go. Has anyone got practical experience of deploying it on Linux? Any feedback would be much appreciated. Geoff Caplan -- PHP Database 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-DB] Combining INSERT...SELECT and INSERT INTO
Markus, Off hand, I don't know. Just try it -- you're not really going to break anything and may come up with something we can all use. About 12 years ago I was working for a sewer and water contractor, which built a number of "interesting" projects. Before starting with them I assumed they just knew how to build them. I was wrong. If they only built what they knew their business would have shrivelled and died. They grew by building what many other contractors considered undoable, and got premium prices. When I struck out on my own that was the lesson I took with me. And it's a tough one, because I generally like to know how things will turn out before I finish. Several years ago I was 30% of the way into a project in VB when it became very clear that for what I wanted to do VB just didn't have the capabilities. So it was back to FoxPro for Windows and successful completion. Fortunately the client was understanding. So, it's a good question. But sometimes we just have to try these things. If Rasmus et. al. hadn't we wouldn't have PHP today. Cheers, and please let us know how it works out - Miles At 12:54 PM 1/14/2002 +0200, Markus Lervik wrote: >Hello! > >It's me again, with the magazine database : ) > >Is there any way to combine INSERT...SELECT and INSERT INTO so >one could insert a new row with a few values inserted by hand and others >from another table? something like > >INSERT INTO mag_table (mag_id,issn,year,info,volume,numbers,remarks) >VALUES ( (SELECT id FROM mag_names WHERE mag_names.name="Asdf"), >"1234-5678","2001","foobar","1-4","1-52","foobar"); > >I'm trying to construct myself a nice clever INSERT statement to my >web-frontend. Haven't got it to work, though. Is this even possible? >The other option would be to use three(?) mysql_query calls from my PHP-code, >but I'd like to keep it as simple as possible. > >Cheers, >Markus > >-- >Markus Lervik >Linux-administrator with a kungfoo grip >Vaasa City Library - Regional Library >[EMAIL PROTECTED] >+358-6-325 3589 / +358-40-832 6709 > >-- >PHP Database 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 Database 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-DB] LIMIT and get_num_rows
On Monday 14 January 2002 19:21, Markus Lervik wrote: > Damnit. > Forgot to cc to the list, again. Here it is. > > -- Forwarded Message -- > > On Monday 14 January 2002 12:55, you wrote: > > hi guys, just looking for verification on this, as i don't think there's > > any way to do it > > > > Basically, i want to return the results for a search, but only return the > > first 20 results from the start number given > > LIMIT $start, 20 > > BUT... i'd like to have a page 1-whatever so if there are 65 results in > > total, then the first 20 will be shown, but there will be options to move > > to pages 2,3 or 4. > > Obviously, if i use LIMIT, then it won't know that there are 65 in total, > > so how would i get around this? do i just have to do the full query, and > > then only use the first 20 results in the results set? > > just becomes a bit of a problem if there are, say, 8000 results returned! > > would it just be best to return the first 200 using LIMIT, and do my > > pages for those, with a note that there are more than 200 results, and to > > refine the search criteria? > > Cheers, > > Matt > > Matt, > > Here's how I did the "20 results per page". Messy, I know, but > it was the only way I figured out how to do it. > > $query="SELECT * FROM table"; > > $result=mysql_query($query,$database); > $nr=mysql_num_rows($result); > /* Here you can slap in a check for how many results > you want, ie: > */ > if($nr>200) { > die("Bitch,whine and moan!"); > } > $nr_pages=(ceil($nr/20)); > > Or, you could, in the first SELECT statement put in a > LIMIT 200, I suppose that would work, too. > I'd have to dig into this myself too, as my database will > have a tad over 100 000 records when it's done. > > > Then I have two buttons, prev & next that's got a little > javascript slapped on them; > > onclick="parent.location='nav.php?nav=true&go=prev';"> One potential problem (or feature, depending on which way you look at it!) is that refreshing/reloading a page will jump to the next or previous page depending on which action was last performed. The way around this is to pass a position variable indicating which page of results to view, rather than an 'action' variable. -- Jason Wong -> Gremlins Associates -> www.gremlins.com.hk /* In real love you want the other person's good. In romantic love you want the other person. -- Margaret Anderson */ -- PHP Database 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-DB] LIMIT and get_num_rows
Damnit. Forgot to cc to the list, again. Here it is. -- Forwarded Message -- On Monday 14 January 2002 12:55, you wrote: > hi guys, just looking for verification on this, as i don't think there's > any way to do it > > Basically, i want to return the results for a search, but only return the > first 20 results from the start number given > LIMIT $start, 20 > BUT... i'd like to have a page 1-whatever so if there are 65 results in > total, then the first 20 will be shown, but there will be options to move > to pages 2,3 or 4. > Obviously, if i use LIMIT, then it won't know that there are 65 in total, > so how would i get around this? do i just have to do the full query, and > then only use the first 20 results in the results set? > just becomes a bit of a problem if there are, say, 8000 results returned! > would it just be best to return the first 200 using LIMIT, and do my pages > for those, with a note that there are more than 200 results, and to refine > the search criteria? > Cheers, > Matt Matt, Here's how I did the "20 results per page". Messy, I know, but it was the only way I figured out how to do it. $query="SELECT * FROM table"; $result=mysql_query($query,$database); $nr=mysql_num_rows($result); /* Here you can slap in a check for how many results you want, ie: */ if($nr>200) { die("Bitch,whine and moan!"); } $nr_pages=(ceil($nr/20)); Or, you could, in the first SELECT statement put in a LIMIT 200, I suppose that would work, too. I'd have to dig into this myself too, as my database will have a tad over 100 000 records when it's done. Then I have two buttons, prev & next that's got a little javascript slapped on them; etc. Then, in nav.php: if($go=="next") { if($page < $nr_pages && $page >= 0) { $page++; $with= (($page) * 20).","; $what = (($page-1) * 20).","; $query=ereg_replace($what,$with,$query); } } if($go=="prev") { if($page>=1 && $page <= $nr_pages) { $page--; $with = (($page) * 20).","; $what = (($page+1) * 20).","; $query=ereg_replace($what,$with,$query); } } $result=mysql_query($query,$database) print_table(); //processes the query If you got any questions regarding my code, please do drop me a mail. Cheers, Markus --- -- Markus Lervik Linux-administrator with a kungfoo grip Vaasa City Library - Regional Library [EMAIL PROTECTED] +358-6-325 3589 / +358-40-832 6709 -- PHP Database 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-DB] LIMIT and get_num_rows
On Monday 14 January 2002 19:06, matt stewart wrote: > but presumably if i'm doing a SELECT count(*) FROM Designs WHERE Keywords > LIKE "%sport%" > followed by a SELECT * FROM Designs WHERE Keywords LIKE "%sport%" LIMIT > 0,20 > > it's still using nearly as much processing time as just returning all the > designs and just using a get_num_rows and then only using the first 20? > Possibly, I don't know. BUT if query returns 8000 records as opposed to 20, then it definitely uses up a bit more memory. This may be an issue if you have loads of such queries happening simultaneously. -- Jason Wong -> Gremlins Associates -> www.gremlins.com.hk /* Love is not enough, but it sure helps. */ -- PHP Database 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-DB] LIMIT and get_num_rows
but presumably if i'm doing a SELECT count(*) FROM Designs WHERE Keywords LIKE "%sport%" followed by a SELECT * FROM Designs WHERE Keywords LIKE "%sport%" LIMIT 0,20 it's still using nearly as much processing time as just returning all the designs and just using a get_num_rows and then only using the first 20? -Original Message- From: Jonatan Bagge [mailto:[EMAIL PROTECTED]] Sent: 14 January 2002 11:00 To: matt stewart Subject: Re: [PHP-DB] LIMIT and get_num_rows First do a SELECT count(*) from tablename; This will get the number of entries... The rest should be simple... matt stewart wrote: hi guys, just looking for verification on this, as i don't think there's any way to do it Basically, i want to return the results for a search, but only return the first 20 results from the start number given LIMIT $start, 20 BUT... i'd like to have a page 1-whatever so if there are 65 results in total, then the first 20 will be shown, but there will be options to move to pages 2,3 or 4. Obviously, if i use LIMIT, then it won't know that there are 65 in total, so how would i get around this? do i just have to do the full query, and then only use the first 20 results in the results set? just becomes a bit of a problem if there are, say, 8000 results returned! would it just be best to return the first 200 using LIMIT, and do my pages for those, with a note that there are more than 200 results, and to refine the search criteria? Cheers, Matt --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system ( HYPERLINK "http://www.grisoft.com"http://www.grisoft.com). Version: 6.0.313 / Virus Database: 174 - Release Date: 02/01/02 -- PHP Database Mailing List ( HYPERLINK "http://www.php.net/"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] --- Incoming mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.313 / Virus Database: 174 - Release Date: 02/01/02 --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.313 / Virus Database: 174 - Release Date: 02/01/02
[PHP-DB] Combining INSERT...SELECT and INSERT INTO
Hello! It's me again, with the magazine database : ) Is there any way to combine INSERT...SELECT and INSERT INTO so one could insert a new row with a few values inserted by hand and others from another table? something like INSERT INTO mag_table (mag_id,issn,year,info,volume,numbers,remarks) VALUES ( (SELECT id FROM mag_names WHERE mag_names.name="Asdf"), "1234-5678","2001","foobar","1-4","1-52","foobar"); I'm trying to construct myself a nice clever INSERT statement to my web-frontend. Haven't got it to work, though. Is this even possible? The other option would be to use three(?) mysql_query calls from my PHP-code, but I'd like to keep it as simple as possible. Cheers, Markus -- Markus Lervik Linux-administrator with a kungfoo grip Vaasa City Library - Regional Library [EMAIL PROTECTED] +358-6-325 3589 / +358-40-832 6709 -- PHP Database 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-DB] LIMIT and get_num_rows
hi guys, just looking for verification on this, as i don't think there's any way to do it Basically, i want to return the results for a search, but only return the first 20 results from the start number given LIMIT $start, 20 BUT... i'd like to have a page 1-whatever so if there are 65 results in total, then the first 20 will be shown, but there will be options to move to pages 2,3 or 4. Obviously, if i use LIMIT, then it won't know that there are 65 in total, so how would i get around this? do i just have to do the full query, and then only use the first 20 results in the results set? just becomes a bit of a problem if there are, say, 8000 results returned! would it just be best to return the first 200 using LIMIT, and do my pages for those, with a note that there are more than 200 results, and to refine the search criteria? Cheers, Matt --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.313 / Virus Database: 174 - Release Date: 02/01/02 -- PHP Database 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-DB] ADDING DATES
Hear, hear! =dn > Yep, maybe it is, but when a post starts with " ... but i am getting lazy", > I get a bit peeved. The implication is "Do my work for me." > > It's different when the context is I want to do this ... tried this ... > results aren't right ... please help. > > Miles > > At 06:04 PM 1/13/2002 -0800, Daniel Barton wrote: > >Miles, > >Hmm... "RTFM!" .. > >That's a pretty unproductive post. > > > >Pedro, > >There are two PHP functions that will suffice. date() and mktime(). > > > >I've cut and pasted this from the PHP manual: > > > >$tomorrow = mktime (0,0,0,date("m") ,date("d")+1,date("Y")); > >$lastmonth = mktime (0,0,0,date("m")-1,date("d"), date("Y")); > >$nextyear = mktime (0,0,0,date("m"), date("d"), date("Y")+1); > > > >That should do the trick. > > > >-db > > > >Miles Thompson wrote: > > > > > RTFM! > > > > > > At 12:17 AM 1/14/2002 +, Pedro M. S. Oliveira wrote: > > > > > > >Hi all, first of all i'm sorry to ask this but i am getting lazy and i bet > > > >you all can answer me in a couple of code lines. > > > >i want to add some days to the the result of the date php function. > > > >how can i had lets say 3 days? > > > >ex: > > > >(pseudo code) > > > > > > > > > > >$date =date(,mm,dd); > > > >$date =date(,mm,dd) + 3days; > > > >echo $date; > > > >echo "thank you all"; > > > >?> > > > > > > > >Thanks > > > >Pedro > > > > > > > > > > > >-- > > > >PHP Database 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 Database 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] > > > >-- > >-- > >Dan Barton > >Terrestrial Program Biologist > >Asst. Data Manager > >Point Reyes Bird Observatory > >http://www.prbo.org > >[EMAIL PROTECTED] > >[EMAIL PROTECTED] > > > -- > PHP Database 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 Database 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-DB] The New Guy
Christopher, > I do a lot of work with Perl and have decided to see what this PHP is all > about. The best way for me to do that, is to just do a project. Here is what > I am looking to do. I would like to use PHP and the SQL language on a CSV or > Flat File Database. A lot of my work is on unix system that people want to > work with Access. They do not want to pay the extra amount of money fora > MySQL database. The answer to this issue is access with exports to CSV files > for some of the simplier stuff like shopping carts and members and stuff > like that. > Here's the thing, can PHP interact with a flat file databse like perl and > the DBD::CSV? If so can someone point me in the right idrection to get > started. I have a server for development and it now has 4.0 PHP. =When you next change jobs will you be keen to accept a company car that has one wheel permanently removed, has no doors, and is pulling a U-Haul filled with lead bars and raw sewage, topped off with a flag saying "We are the greatest!" ? =Is the outlined task a primary focus of PHP? PHP is renowned for its web orientation (output is HTML), and support of databases to build/run dynamic web sites. Ironically 'dumbing it down' to "simpler stuff[sic]", like removing the fourth wheel from a car, is likely to give you a very stunted/skewed view of the package. =Yes PHP has a library of flat file routines, if you insist on using them. MySQL has the capability to LOAD .csv DATA if that is the specified transfer medium, and would offer full RDBMS speed and dynamism. =Where do the lead bars etc fit in? You mention Unix systems and the Access package, plus CSV file exports. In such an incompatible environment you are hobbling the development project before you start. Again with the result that any system produced will not be representative of what PHP can do. =PHP users talk of "LAMPS" and the PHP Triad (the former is well explained by O'Reilly (the publishers) and Google will supplement my faded memory for a source on the latter). LAMPS is Linux, Apache (web server), MySQL (RDBMS), and PHP. The PHP 'Triad' is the last of those three conveniently packaged together for download/installation. So from this you can take it that PHP was designed to/will work well in any combination of these. =In your example, I fail to perceive success in a Unix-Access combination, but presume you know more than I. The PHP-MySQL combination is proven, and operates at a far more 'industrial scale' than Access (more comparable to MS SQL-Server). In a standard commercial environment I cannot think of a particular service that MySQL under PHP control cannot provide, that Access can - but many pragmatic reasons not to use Access. =You mention "extra money". This may or may not be the case. If it were a comparison between buying Access or buying MySQL then it would be wrong, but if they have already paid for Access then you may be correct. By and large, MySQL is 'free' but MySQL AB will charge for a support contract - but you must check your application against the license terms! You also ask about 'sources'. The best place to start, both to review the licensing and to find links to online sources is the MySQL AB web site. =Get rid of the "we are the greatest" flag, and choose the right tool for the job - or leave the challenge of starting on a PHP/MySQL career until it/they are the 'right' tool/best mix for the client-constraints of your application! =dn -- PHP Database 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-DB] phpMyAdmin - blank screen?
hallo guys! i'm a newbie in php..I've installed phpMyAdmin on my pc, together with MySQL and Apache with PHP 4 on Win98. the index.php page is blank! any ideas/suggestions from u ppl? gracias! _ Join the worlds largest e-mail service with MSN Hotmail. http://www.hotmail.com -- PHP Database 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-DB] convert yyyy/mm/dd to mm/dd/yyyy, how?
Sander, I'm also in Europe but here in the UK we prefer dd/mm/ and I've cobbled together a couple of functions to handle this for me. function dbdate($input) { $today = explode("-",$input); $month = $today[1]; $day = $today[2]; $year = $today[0]; $p_date = $day . "/" . $month . "/" . $year ; return $p_date; } function revdate($input) { $today = explode("/",$input); $day = $today[0]; $month = $today[1]; $year = $today[2]; $revdate = $year . "-" . str_pad($month, 2, "0", STR_PAD_LEFT) . "-" . str_pad($day, 2, "0", STR_PAD_LEFT); return $revdate; } I've stored these in a file which I include and any call to the db to display dates uses the dbdate() function and if I want to insert or update a date then I use the revdate() function. There are probably better ways to do this. Hope this helps. George in Edinburgh - Original Message - From: "Sander Peters" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> Sent: Sunday, January 13, 2002 7:56 PM Subject: [PHP-DB] convert /mm/dd to mm/dd/, how? > Hello everybody, > > convert /mm/dd to mm/dd/, how? > > MYSQL does everything in /mm/dd. > I live in the Netherlands and we are use to the format dd/mm/. > > What's the best way to display it as mm/dd/ in a table on a query? > > My first idea whas to split the date up in vars in php and then print > the vars in the way I like it > Is this a bad idea? Or are there better sollutions? > > Thanx in advance for answering! > > > > -- > Met vriendelijke groet / With Greetings, > > Sander Peters > >site: http://www.visionnet.nl/ > email: mailto:[EMAIL PROTECTED] > webmail: mailto:[EMAIL PROTECTED] > > > > -- > PHP Database 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] --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.307 / Virus Database: 168 - Release Date: 11/12/01 _ Do You Yahoo!? Get your free @yahoo.com address at http://mail.yahoo.com -- PHP Database 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]