[PHP-DB] RE: [PHP] Problems w/ goto
[snip] Thank you with your excellent help in the past. Here is another puzzler I am trying to write a program that can have two(2) independent forms in one PHP file. When I run the code below [from PHP - A Beginner's Guide], to which I have added a second form, it freezes. Without the goto statements, it runs. When it does run, it displays both forms on one Web screen. What I desire is for the first form to be displayed, the data entered and then the second form displayed. In an actual, not test program like this one, the data in the second form would be dependent on the first form. What did I do wrong? [/snip] You used GOTO. In this case I would recommend using something like jQuery to 'hide' one form until the other form is complete. PHP has sent the output to the browser already, both forms are there and display when you remove the GOTO. GOTO should never be used like this. GOTO should never be used. -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DB] RE: [PHP] Sample script files with 3 different select boxes with mysql conditions in select boxes
[snip] I have a table with the below fields. (id, title, language, author link to the book). Initially I want to display a page with 3 select boxes (language, author title). Initially first select box displays the available language by querying the database. On selecting one language, author select box should show the matching records from the database. After selecting the author, matching records should display in title. Could any body send the sample script files with 3 select boxes? [/snip] There are several examples here http://www.google.com/search?hl=enq=populating+select+boxes -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DB] RE: [PHP] MySQL Identifying worst-performing codes
[snip] There is a tool call idera (SQL diagnostic manager). Basically it is a performance monitoring and diagnostics tool. It has a feature; Identifying of worst-performing codes - Identifies performance bottlenecks such as the worst-performing stored procedures, long-running queries, most frequently run queries, SQL Statements and SQL batches http://www.idera.com/Products/SQLdm/Features.aspx I'm looking for a same like tool for MySQL. Is anyone have any ideas. [/snip] Have you thought about asking this on the MySQL list? -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DB] RE: [PHP] Missing mysql_real_escape_string() function in PHP 4.3.4
[snip] I'm trying to move a PHP application that was originally built on the windows PHP implementation to a newly installed Fedora FC1 Linux system. However the Fedora implementation of PHP 4.3.4 seems to be missing the mysql_real_escape_string() function. I suspect that there might be other mysql functions missing as well - so I would appreciate your advice on how to get this new system up to speed with all of the latest PHP 4.3.x extensions. [/snip] Here are all of the available mysql functions, each has its version listed on the appropropriate page. http://us4.php.net/manual/en/ref.mysql.php -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DB] RE: [PHP] Changing case
[snip] The problem is if someone enters aa-1234 and the other items in the quote are FF-2345 and QQ-3456 then the aa-1234 is UNDER them, instead of on top. [/snip] http://www.php.net/strtoupper -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DB] RE: [PHP] keyword searching
[snip] I am selecting a field in a database called description for keyword searching. The field contains names of people, states, years, etc. When someone searches for say holmes north carolina the query searches for exactly that, fields which have holmes north carolina, and not fields that contaim holmes, north, and carolina. So I run a str_replace to replace all spaces with *, which turns it into holmes*north*carolina, but say that north carolina is before holmes in the field, it won't return those fields (it only returns fields in which holmes is infront of north carolina). So how can I have it return all fields which contain all the words holmes, north, and carolina in any order, in that field? [/snip] You don't say which database you are using, but several allow for full text searching of fields where the order is inconsequential. The behaviour you describe is preceisely how most (if not all) databases will return a search on a standard column type. -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DB] RE: [PHP]{Semi-OT} keyword searching
[snip] I'm using Informix SQL. Do you know how to do full text searching on Informix? If so, please share the details :) [/snip] You will have to consult your Informix documentation in order to discern if full-text features are available. Usually the text column where the information is being held has to be set to the 'full-text' type. You could fake this with PHP by taking your search terms and shuffling them, but this requires performing the query several times with shuffled requests. -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DB] RE: [PHP] php|cruise - do unto others...
[snip] PayPal a contribution to [EMAIL PROTECTED] [/snip] Fabulous idea Ed, I wish I'd a thunk it for me. At the risk of seeming ignorant (same risk I run each day by just getting out of bed) how exactly do I PayPal a contribution to [EMAIL PROTECTED]? I have made Paypal contributions before, but I've never seen (to my recollection) one done directly before. Thanks! Jay -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DB] RE: [PHP] Re: [PHP-DEV] [CROSS POST] PHP Meetup Texas PHP Users
Well, the predictions have come true. In San Antonio only four folks signed up for the meetup, and the event was cancelled with no way to get in touch with the other local developers to make a go of it. Out of the 147 cities listed only 15 had enough people for meetup.com to do their thing. A noble idea, but ... I want to encourage developers to farm PHP developer groups in their own communities. Some may find that their community already has a users group (a list is available at http://www.phpusergroups.org) although some of these groups are not really groups at all, just people looking to form groups. If you live in the San Antonio area I would be glad to be the chief-wrangler-whats-in-charge for just such a group. Please contact me directly. I am also working on a Texas PHP Developer Conference at the beautiful T Bar M Resort Conference Center in New Braunfels, Texas sometime between January and April of 2003. I have begun contacting potential speakers and hope to have people who wish to present papers at the conference as well as do some other fun activities such as a high or low ropes course, golf, tennis, etc. All suggestions and admonitions are welcome. Everyone in Texas is invited to contact me so that I can dispurse further information. Also, my contact at T Bar M says, The more, the cheaper ... as discounts for larger groups are available. Heck, even if you don't live in Texas but would be interested in attending drop me a line and I'll keep you up to date. Thanks! Jay Its as bad as you think, and they are out to get you. *** * * * Texas PHP Developers Meeting* * Spring 2003 * * T Bar M Resort Conference Center * * New Braunfels, Texas* * Interested? Contact;* * [EMAIL PROTECTED] * * * *** -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DB] RE: [PHP] Re: [PHP-DEV] [CROSS POST] PHP Meetup Texas PHP Users
[snip] First of all, sorry for the additional cross post. MeetUp.com lacks the ability to let you contact other folks who have signed up. In my general area, Massachusetts, there are a bunch of tiny groups scattered about, and I'd like a chance to get all of them to converge in one place to make the meetup worth it for all of us. I know there's only a few days before the meetup is to take place, but if folks from the following areas could email me, then we can try and work out somewhere we can all meet, instead of there being 5 groups of 2 or 3 people. [/snip] Agreed Gabriel, meetup.com, while a nice idea, does not work well at all due to the lack of contact information provided. But look what it may have started! I encourage PHP developers to seek each other and form their own groups. But even the PHP lists barely scratch the surface of developers who are out there. Contact other computer users groups in your area and you may be surprised at what pops-up. Jay LOTTERY: A tax on people who are bad at math *** * * * Texas PHP Developers Meeting* * Spring 2003 * * T Bar M Resort Conference Center * * New Braunfels, Texas* * Interested? Contact;* * [EMAIL PROTECTED] * * * *** -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DB] RE: PHP meetup [CROSS-POST] Meet other PHP Developers in Your Area
[snip] No, it's not a dating service :) Want to meet other PHP developers in your area? Check out: http://php.meetup.com/ Pretty nifty idea... especially given the lack of user groups in the U.S. I thought for others who had not seen this I would post this. There is probably already a user group in your area if you live near a major city. According to the PHPusergroups.org web site [http://www.phpusergroups.org/groups.phtml?menu=groups] there 189 PHP user groups in 52 countries. [/snip] I have seen some users groups mentioned, which is outstanding. PHP Meetup is gaining lots of ground with 105 members at last check. Top 5 cities are... Manhattan (below 42nd St) (5 members) London, England (4 members) Ann Arbor, MI (3 members) Melbourne (3 members) Washington DC (3 members) [actually tied with Philadelphia, PA and Orange County, CA] And I finally saw another San Antonio member. Just want to keep this fresh in everyone's mind. If you know of other developer lists where php is discussed please forward this along. Thanks! Jay Do not meddle in the affairs of dragons-for you are crunchy and good with ketchup -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DB] PHP meetup [CROSS-POST] Meet other PHP Developers in Your Area
No, it's not a dating service :) Want to meet other PHP developers in your area? Check out: http://php.meetup.com/ Pretty nifty idea... especially given the lack of user groups in the U.S. [/snip] I thought for others who had not seen this I would post this. There is probably already a user group in your area if you live near a major city. According to the PHPusergroups.org web site [http://www.phpusergroups.org/groups.phtml?menu=groups] there 189 PHP user groups in 52 countries. Jay Chaos, panic disorder my work here is done! -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DB] RE: [PHP] dumping only selected records into another table
[snip] I have some data in one table which I have to move to another. No I thought of a mysqldump with a where clause. The problem though is, that it also tryes to insert the ID which is a autoinc. primary key and already in use by another record. How can I produce a insert statement withouth the ID included? [/snip] RTFMySQLM http://www.mysql.com/doc/I/N/INSERT_SELECT.html HTH! Jay It's hip to snip! Give a man a program, frustrate him for a day. Teach a man to program, frustrate him for a lifetime. -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DB] RE: [PHP] Ho to write output of sql query to txt file?
[snip] I am trying to get only records out of a table mathing a query. This should be piped into a textfile. My problem is that I have to transmit this records to a new machine. So the output should be a kind of sql commands which I could run with phpadmin or similar to import them to the other db on the other machine. Is this possible? [/snip] from: http://www.mysql.com/doc/S/E/SELECT.html The SELECT ... INTO OUTFILE 'file_name' form of SELECT writes the selected rows to a file. The file is created on the server host and cannot already exist (among other things, this prevents database tables and files such as `/etc/passwd' from being destroyed). You must have the file privilege on the server host to use this form of SELECT. SELECT ... INTO OUTFILE is mainly intended to let you very quickly dump a table on the server machine. If you want to create the resulting file on some other host than the server host you can't use SELECT ... INTO OUTFILE. In this case you should instead use some client program like mysqldump --tab or mysql -e SELECT ... outfile to generate the file. SELECT ... INTO OUTFILE is the complement of LOAD DATA INFILE; the syntax for the export_options part of the statement consists of the same FIELDS and LINES clauses that are used with the LOAD DATA INFILE statement. See section 6.4.9 LOAD DATA INFILE Syntax. In the resulting text file, only the following characters are escaped by the ESCAPED BY character: The ESCAPED BY character The first character in FIELDS TERMINATED BY The first character in LINES TERMINATED BY Additionally, ASCII 0 is converted to ESCAPED BY followed by 0 (ASCII 48). The reason for the above is that you must escape any FIELDS TERMINATED BY, ESCAPED BY, or LINES TERMINATED BY characters to reliably be able to read the file back. ASCII 0 is escaped to make it easier to view with some pagers. As the resulting file doesn't have to conform to the SQL syntax, nothing else need be escaped. Here follows an example of getting a file in the format used by many old programs. SELECT a,b,a+b INTO OUTFILE /tmp/result.text FIELDS TERMINATED BY ',' OPTIONALLY ENCLOSED BY '' LINES TERMINATED BY \n FROM test_table; HTH! Jay -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DB] RE: [PHP] Ho to write output of sql query to txt file?
[snip] I did read on mysql.com and your article. Than I tryed to transfer the datasets. Export worked ok. The textfile contains the records. Import message: Query OK, 35 rows affected (0.04 sec) Records: 35 Deleted: 0 Skipped: 0 Warnings: 630 The warning already tells it. the datasets are totally empty. Only default of the columns is set. [/snip] Did you remember to add a field seperator? That seems the likely cause of the problem. Jay -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php