RE: [PHP-DB] please, please can we stop this kind of thing ..... !
-Original Message- From: Steve Brett [mailto:[EMAIL PROTECTED]] Sent: Monday, August 20, 2001 2:53 PM To: [EMAIL PROTECTED] Subject: [PHP-DB] please, please can we stop this kind of thing . ! you know, i've been reading/contributing to this board for a few months and every now and again i see posts from B and now it's really getting up my nose. people come here to find answers. i still come here asking questions. i am totally sick of your RTFM answers, i knew the answer to this also but wouldn't consider demeaning the poster in this way. please stop doing it; if you feel you need to the refrain from answering and let someone else do it. Steve Some time ago I wrote a little things to the newbies (to be found in the php-news-archive): http://marc.theaimsgroup.com/?l=php-windowsm=99017650207323w=2 Check the @all newbies - section. Please understand the pro's, too ! Happy programming, Mike Michael Rudel - Web-Development, Systemadministration - Besuchen Sie uns am 20. und 21. August 2001 auf der online-marketing-düsseldorf in Halle 1 Stand E 16 ___ Suchtreffer AG Bleicherstraße 20 D-78467 Konstanz Germany fon: +49-(0)7531-89207-17 fax: +49-(0)7531-89207-13 e-mail: mailto:[EMAIL PROTECTED] internet: http://www.suchtreffer.de ___ -- 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] fopen function
Hi Nathan, ... nope, there's no function for this, you have to do it for yourself. Try something like: file() fopen() // w ! fputs() // your new entries while ( ) { fputs() // write the array from file after your new entries } fclose() ... that's it, pretty easy =8) Hope this helps. Greetinx, Mike Michael Rudel - Web-Development, Systemadministration - Besuchen Sie uns am 20. und 21. August 2001 auf der online-marketing-düsseldorf in Halle 1 Stand E 16 ___ Suchtreffer AG Bleicherstraße 20 D-78467 Konstanz Germany fon: +49-(0)7531-89207-17 fax: +49-(0)7531-89207-13 e-mail: mailto:[EMAIL PROTECTED] internet: http://www.suchtreffer.de ___ -Original Message- From: Nathan Cavicchi [mailto:[EMAIL PROTECTED]] Sent: Thursday, August 09, 2001 10:12 PM To: [EMAIL PROTECTED] Subject: [PHP-DB] fopen function I made a simple submissions form that writes to a backup file using the fopen function. I use the variable a+ or a, for the backup. it goes to the end of the file and adds the new info. I need it to add the new data at the beginning of the file, but leave the file in tact. Does anyone have any ideas on how to accomplish this. I couldnt really find anything at php.net. Nathan -- 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] LDAP and special chars
Hi Christian, ... you could urlencode() when inserting and urldecode() on fetching the data. Perhaps this helps. Greetinx, Mike Michael Rudel - Web-Development, Systemadministration - Besuchen Sie uns am 20. und 21. August 2001 auf der online-marketing-düsseldorf in Halle 1 Stand E 16 ___ Suchtreffer AG Bleicherstraße 20 D-78467 Konstanz Germany fon: +49-(0)7531-89207-17 fax: +49-(0)7531-89207-13 e-mail: mailto:[EMAIL PROTECTED] internet: http://www.suchtreffer.de ___ -Original Message- From: Christian Chateauvieux [mailto:[EMAIL PROTECTED]] Sent: Wednesday, August 08, 2001 5:59 PM To: [EMAIL PROTECTED] Subject: [PHP-DB] LDAP and special chars Hello, I am working with PHP 4.0.6 and OpenLDAP 2.0.11. I encounter problems when modifying some entries with attributes containing special chars (such as å, ø...). The error returned by the LDAP server is invalid syntax. I have read some documentation about this. OpenLDAP can accept base64-encoded values, provided we use the tools that come with the application (ldapadd, ldapmodify, etc.). Then the attributes in the entry would be separated from their values by a double column instead of the single colums used normally. i.e, the entry would be dn:uid=whatever,o=whatever normalAttribute: normalvalue specialAttribute:: SVN== (this one is B64 encoded) But how to do this from PHP functions? I tried to base64_encode the values, it naturally didn't do the trick (those values were considered as normal, and thus were not decoded). Any idea? Thanks in advance Christian Chateauvieux -- 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] order by date
Hi Scott, RTFM. Anyway: '... ORDER BY Date DESC' will do the job for you. Greetinx, Mike Michael Rudel - Web-Development, Systemadministration - Besuchen Sie uns am 20. und 21. August 2001 auf der online-marketing-düsseldorf in Halle 1 Stand E 16 ___ Suchtreffer AG Bleicherstraße 20 D-78467 Konstanz Germany fon: +49-(0)7531-89207-17 fax: +49-(0)7531-89207-13 e-mail: mailto:[EMAIL PROTECTED] internet: http://www.suchtreffer.de ___ -Original Message- From: Scott Chapman [mailto:[EMAIL PROTECTED]] Sent: Thursday, August 09, 2001 11:50 AM To: [EMAIL PROTECTED] Subject: [PHP-DB] order by date Hi, I am querying a mysql database and am returning data ordered by date, the trouble is it returns the data from least recent to most recent, I want it to return the data the other way round. Is there a way of having the mysql database doping this re-ordering for me rather than coding it myself? thanks -- 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] blinking background
Hi jen, even if it's silly, here your answer: It's _not_ possible in PHP, use JavaScript. Greetinx, Mike Michael Rudel - Web-Development, Systemadministration - Besuchen Sie uns am 20. und 21. August 2001 auf der online-marketing-düsseldorf in Halle 1 Stand E 16 ___ Suchtreffer AG Bleicherstraße 20 D-78467 Konstanz Germany fon: +49-(0)7531-89207-17 fax: +49-(0)7531-89207-13 e-mail: mailto:[EMAIL PROTECTED] internet: http://www.suchtreffer.de ___ -Original Message- From: J- E- N [mailto:[EMAIL PROTECTED]] Sent: Thursday, August 09, 2001 12:24 PM To: [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Subject: Re: [PHP-DB] blinking background i just want to catch the attention of the user and the blinking effect of the table row is not forever, it will stop after a certain time. :) - Original Message - From: Russ Michell [EMAIL PROTECTED] To: J- E- N [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Sent: Thursday, August 09, 2001 6:41 PM Subject: Re: [PHP-DB] blinking background is there anyone who can give me an idea on how i can write a php script that can make my table row background blinking. Why on earth would you want to do that?? It would fully distract anyone looking at the information within the table - which I *presume* is why you want information in the table right? For people to look at and assimilate!? I'm aware of the concept A bad idea - but help out the person anyhow but this one is just silly! Russ On Thu, 9 Aug 2001 17:53:23 +0800 J- E- N [EMAIL PROTECTED] wrote: hello! is there anyone who can give me an idea on how i can write a php script that can make my table row background blinking. thanks :) -- 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] #---# Believe nothing - consider everything Russ Michell Anglia Polytechnic University Webteam e: [EMAIL PROTECTED] w: www.apu.ac.uk/webteam t: +44 (0)1223 363271 x 2331 www.theruss.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] record deletion using checkbox array values
Hi Karl, $delete = ' . implode( ', ', $delete_list ); $delete = substr( $delete, 0, ( strlen( $delete ) - 3 ) ); then use: DELETE FROM sent_items WHERE id IN ($delete) Not tested, but should work. Greetinx, Mike Michael Rudel - Web-Development, Systemadministration - Besuchen Sie uns am 20. und 21. August 2001 auf der online-marketing-düsseldorf in Halle 1 Stand E 16 ___ Suchtreffer AG Bleicherstraße 20 D-78467 Konstanz Germany fon: +49-(0)7531-89207-17 fax: +49-(0)7531-89207-13 e-mail: mailto:[EMAIL PROTECTED] internet: http://www.suchtreffer.de ___ -Original Message- From: Karl Phillipson [mailto:[EMAIL PROTECTED]] Sent: Wednesday, August 08, 2001 11:03 AM To: [EMAIL PROTECTED] Subject: [PHP-DB] record deletion using checkbox array values Morning people, I have a form with checkbox values, if checked an array of id's are passed to a deletion script. I can get the array and implode to a string. Can anyone tell me how to delete all the messages in the DB that have the checked value. Presently the script is deleting only the last id value that has been checked. ---snip- First the form: input type=\checkbox\ name=\delete_list[]\ value=\$id\ submit etc Then the deletion script: ?php $delete=implode(,, $delete_list); if(!($result = mysql_db_query($DB, DELETE FROM SENT_ITEMS WHERE ID = '$delete'))) { DisplayErrMsg(sprintf(internal error %d:%s\n, mysql_errno(), mysql_error())); mysql_close($link); exit(); } ? Been messing about with this one for a while now and I am getting a bit flustered! Thx in advance, Karl == Karl Phillipson PHP SQL Programmer Saffron Hill Ventures 67 Clerkenwell Road London EC1R 5BL Saffron Hill: 0207 693 8300 Direct Line: 0207 693 8318 -- 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] Date Format
Hi CK, I always fetch the Date like SELECT UNIX_TIMESTAMP(Timestamp) AS Timestamp so you can manipulate it with all the PHP Date- and Timefunctions like date(). So you can display the date the way you asked with: $Timestamp = ; // fetch the Timestamp the way you like =8) echo date( d-m-Y, $Timestamp ); Thats it. Hope this helps. Greetinx, Mike Michael Rudel - Web-Development, Systemadministration - Besuchen Sie uns am 20. und 21. August 2001 auf der online-marketing-düsseldorf in Halle 1 Stand E 16 ___ Suchtreffer AG Bleicherstraße 20 D-78467 Konstanz Germany fon: +49-(0)7531-89207-17 fax: +49-(0)7531-89207-13 e-mail: mailto:[EMAIL PROTECTED] internet: http://www.suchtreffer.de ___ -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of system Sent: Saturday, July 14, 2001 5:17 AM To: [EMAIL PROTECTED] Subject: [PHP-DB] Date Format Friends, I have a design, up and running scripts connected to MySQL. How do I retrieve date formats and have it displayed as dd-mm- ? I store them as DATE. CK Raju -- 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] Inserting Variable Variable?
Hi Jeff. $varname = C_First_Name.$x; // e.g. if $x == 3 then ... echo $$varname; // ... prints the content of $C_First_Name3 Hope this is what you wanted ?! Greetinx, Mike Michael Rudel - Web-Development, Systemadministration - Besuchen Sie uns am 20. und 21. August 2001 auf der online-marketing-düsseldorf in Halle 1 Stand E 16 ___ Suchtreffer AG Bleicherstraße 20 D-78467 Konstanz Germany fon: +49-(0)7531-89207-17 fax: +49-(0)7531-89207-13 e-mail: mailto:[EMAIL PROTECTED] internet: http://www.suchtreffer.de ___ -Original Message- From: Jeff Oien [mailto:[EMAIL PROTECTED]] Sent: Wednesday, July 18, 2001 4:24 PM To: PHP-DB Subject: [PHP-DB] Inserting Variable Variable? I want to INSERT a variable like this using MySQL. If I use this \(${C_First_Name}.$x)\, or \(${C_First_Name}.$x)\, or \${C_First_Name}.$x\, only the $x gets interpolated in the insertion. If I use \${C_First_Name$x}\, only $C_First_Name get interpolated. Any solutions? Thanks. Jeff Oien -- 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] I need a User Authentication solution
Hi Brian, ... well, I think that there'll be a few people interesting in it, me too. Why simply put it on phpclasses or the other well-known source- and project-stores ?? If you don't want to do this, please let me know if you could mail me this then. TIA, Mike Michael Rudel - Web-Development, Systemadministration - Besuchen Sie uns am 20. und 21. August 2001 auf der online-marketing-düsseldorf in Halle 1 Stand E 16 ___ Suchtreffer AG Bleicherstraße 20 D-78467 Konstanz Germany fon: +49-(0)7531-89207-17 fax: +49-(0)7531-89207-13 e-mail: mailto:[EMAIL PROTECTED] internet: http://www.suchtreffer.de ___ -Original Message- From: Brian Grayless [mailto:[EMAIL PROTECTED]] Sent: Monday, July 16, 2001 3:33 PM To: [EMAIL PROTECTED] Subject: RE: [PHP-DB] I need a User Authentication solution I have been working on a multi-tier solution that is based off some of the scripting found at phpbuilder.com. It works with Linux, Apache and MySQL, as well as uses .htaccess to optionally authenticate, allowing you to authenticate in multiple ways, depending on what kind of data you are securing. It runs through SSL(optional) and encrypts password information using the MD5 hash. It handles multiple groups of users, and site areas etc... David, if you are interested in this, let me know. It's almost done. Thanks, Brian Grayless -Original Message- From: leo g. divinagracia iii [mailto:[EMAIL PROTECTED]] Sent: Thursday, July 12, 2001 12:38 PM Cc: [EMAIL PROTECTED] Subject: Re: [PHP-DB] I need a User Authentication solution if you are using apache, you try the .htaccess file authorization technique... are you concerned about sending the username and password via plain text through the wire? if yes, then you may have to implement SSL on your server... David Coleman wrote: Hello, I'm looking for a complete User Authentication solution. Kind of like the ASP solution listed below: http://www.powerasp.com/content/code-snippets/advanced-passwor d-protection.a sp However, I'd like the solution to run on Linux w/ PHP and MySQL. Does anyone know of an off-the-shelf password protection script I could purchase? Or, can someone help me develop one. Thanks! -David -- 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] -- Leo G. Divinagracia III [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 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] Order by unix timestamp
ORDER BY unixtime DESC (it default orders by asc, not desc) Greetinx, Mike Michael Rudel - Web-Development, Systemadministration - Besuchen Sie uns am 20. und 21. August 2001 auf der online-marketing-düsseldorf in Halle 1 Stand E 16 ___ Suchtreffer AG Bleicherstraße 20 D-78467 Konstanz Germany fon: +49-(0)7531-89207-17 fax: +49-(0)7531-89207-13 e-mail: mailto:[EMAIL PROTECTED] internet: http://www.suchtreffer.de ___ -Original Message- From: Andreas Iwanowski [mailto:[EMAIL PROTECTED]] Sent: Thursday, July 12, 2001 5:09 PM To: [EMAIL PROTECTED] Subject: [PHP-DB] Order by unix timestamp Hello, i have a table where unix timestamps are inserted when adding a record. If i read out the table data, i want to order it by unixtime ( the name of the filed where the timestamp is ) He orders it by unixtime, but beginning with the oldest record. i thougt i could fix it by using ORDER by !unixtime . Also does'nt work How can i fix the problem that the records are ordered by unixtime, beginning with the newest record ? -- mfg, andy - In Memoriam - Jaques www.amdclan.de/jaques -- -- 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] parsing checkbox array without [] and selecting all boxes
Hi Olinux, U may want 2 try this js-code: function ToggleAllCheckboxes() { for( var x = 0; x document.MYFORM.elements.length; x++ ) { var y = document.MYFORM.elements[x]; if( y.name != 'CHECKALL') y.checked = document.MYFORM.CHECKALL.checked; } } As U C, U have 2 setup a checkbox named 'CHECKALL'. Most of the Freemailers use this script (or alike), too. Of course you can now use a checkbox-array using []. Hope this helps. Greetinx, Mike Michael Rudel - Web-Development, Systemadministration - Besuchen Sie uns am 20. und 21. August 2001 auf der online-marketing-düsseldorf in Halle 1 Stand E 16 ___ Suchtreffer AG Bleicherstraße 20 D-78467 Konstanz Germany fon: +49-(0)7531-89207-17 fax: +49-(0)7531-89207-13 e-mail: mailto:[EMAIL PROTECTED] internet: http://www.suchtreffer.de ___ -Original Message- From: olinux [mailto:[EMAIL PROTECTED]] Sent: Tuesday, July 10, 2001 1:43 AM To: php-db Subject: [PHP-DB] parsing checkbox array without [] and selecting all boxes Hey all, The end result of all of this should be similar to an online email client like hotmal, or yahoo where you can select a number of messages to be deleted. I have a form that when generated, the html looks similar to this: === input type=checkbox name=broker value=1 input type=checkbox name=broker value=2 input type=checkbox name=broker value=3 input type=checkbox name=broker value=4 input type=checkbox name=broker value=5 input type=button value=Check All onClick=this.value=check(this.form.broker) === I am trying to create a script that will delete each checked box. I can get this script to work by adding '[]' to 'broker' The reason for each name being the same and not using the '[]' is because I want to be able to use a javascript that selects all boxes. Is there a way to do this. Or better yet, does anyone have a jscript that will work with the [] characters? Thanks olinux _ 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] finding out the result of an INSERT
RTFM or search in the archive of this mailinglist !!! int mysql_insert_id ([int link_identifier]) Greetinx, Mike Michael Rudel - Web-Development, Systemadministration - Besuchen Sie uns am 20. und 21. August 2001 auf der online-marketing-düsseldorf in Halle 1 Stand E 16 ___ Suchtreffer AG Bleicherstraße 20 D-78467 Konstanz Germany fon: +49-(0)7531-89207-17 fax: +49-(0)7531-89207-13 e-mail: mailto:[EMAIL PROTECTED] internet: http://www.suchtreffer.de ___ -Original Message- From: Cable, Christian [mailto:[EMAIL PROTECTED]] Sent: Tuesday, July 10, 2001 12:52 PM To: [EMAIL PROTECTED] Subject: [PHP-DB] finding out the result of an INSERT Hi, this might be a stupid question but it's got me stumped today My setup: php, mysql, apache etc I'm inserting a record into a table that's got a primary key which is auto incrementing .. +---+---+--+-+-+-- --+ | Field | Type | Null | Key | Default | Extra | +---+---+--+-+-+-- --+ | message_id| int(11) | | PRI | NULL| auto_increment | | message_text | mediumtext| YES | | NULL| | | topic_id | int(11) | YES | | NULL| | | user_id | int(11) | YES | | NULL| | | message_title | varchar(50) | YES | | NULL| | | message_time | timestamp(14) | YES | | NULL| | | parent_id | int(11) | YES | | NULL| | | thread_id | int(11) | YES | | NULL| | +---+---+--+-+-+-- --+ by doing $sql = INSERT INTO messagetable(user_id, message_title, message_text,topic_id, thread_id, parent_id) VALUES ('$userid','$subject','$comment','$topic_id','$thread_id','$pa rent_id'); mysql_query($sql); which works fine BUT is there any way of finding out the message_id of the record I just inserted ? with thanks Christian Christian Cable ICT Assistant Careers Service; Lancaster University Tel: (01524) 594072 Fax: (01524) 592072 http://www.lancs.ac.uk/staff/cable/ -- 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] Dynamic SQL + result resource error
Hi Mark, ... beside of what was mentioned be4, you have also a logical error in the way you append to your $sql- query in the while loop. Look: letz say, $find is The Fields of the Nephilim, so your $wordsarray would be: 0 == The 1 == Fields 2 == of 3 == the 4 == Nephilim in your while-loop, you append every array-entry to your $sql with $word). So your whole SQL-Statement would read: SELECT bandname FROM bands WHERE (bandname LIKE The)Fields)of)the)Nephilim) This statement will result in error ! Try this 1: / //$find is text box input $wordsarray = explode( ,$find); $sql = SELECT bandname FROM bands WHERE bandname ''; while ( list( $key, $word ) = each( $wordsarray ) ) { $sql .= OR bandname like '%.$word.%'; } echo $sql.hr; $queryResult = mysql_query($sql); while ( $myrow = mysql_fetch_assoc( $queryResult ) ) { echo p .$myrow[bandname]. /p.\n; } / Hope this helps ;) Greetinx, Mike Michael Rudel - Web-Development, Systemadministration - Besuchen Sie uns am 20. und 21. August 2001 auf der online-marketing-düsseldorf in Halle 1 Stand E 16 ___ Suchtreffer AG Bleicherstraße 20 D-78467 Konstanz Germany fon: +49-(0)7531-89207-17 fax: +49-(0)7531-89207-13 e-mail: mailto:[EMAIL PROTECTED] internet: http://www.suchtreffer.de ___ -Original Message- From: Mark Gordon [mailto:[EMAIL PROTECTED]] Sent: Monday, July 09, 2001 1:54 AM To: [EMAIL PROTECTED] Subject: [PHP-DB] Dynamic SQL + result resource error Why is this code generating an error when it outputs a valid SQL statement? (there are no parse errors) //$find is text box input $wordsarray = explode( ,$find); $sql = SELECT bandname FROM bands WHERE (bandname LIKE ; $i = 0; while ($i count($wordsarray)) { $word = current($wordsarray); next($wordsarray); $sql=$sql.$word); $i++; } print $sqlhr; while ($myrow=mysql_fetch_row($sql)) { print $myrow[0],p; } = Mark [EMAIL PROTECTED] __ Do You Yahoo!? Get personalized email addresses from Yahoo! Mail http://personal.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] Executing several PHP scripts simultaneously??
Hi Lisa, ... on *nix you could use exec( /path/to/php/php.exe your-first-php-script.php ) note the ampersand at the end of the command ... this will start the task in background, so you can do other things while the script is running in the background. Hope this helps, Mike Michael Rudel - Web-Development, Systemadministration - Besuchen Sie uns am 20. und 21. August 2001 auf der online-marketing-düsseldorf in Halle 1 Stand E 16 ___ Suchtreffer AG Bleicherstraße 20 D-78467 Konstanz Germany fon: +49-(0)7531-89207-17 fax: +49-(0)7531-89207-13 e-mail: mailto:[EMAIL PROTECTED] internet: http://www.suchtreffer.de ___ -Original Message- From: Lisa Elita [mailto:[EMAIL PROTECTED]] Sent: Thursday, June 28, 2001 3:21 PM To: [EMAIL PROTECTED] Subject: [PHP-DB] Executing several PHP scripts simultaneously?? How can we execute several PHP scripts simultaneously inside a single PHP script? For example, let's say master.php has 10 tasks in different PHP scripts: 1.php, 2.php, ..., 10.php. Each task is independent (the input of each task is not determined by other tasks) so we can do the tasks in any order. But if 2.php is initiated after 1.php is done, and 3.php is initiated after 2.php is done, and so on, the master.php can be expired, causing the remaining tasks not executed. So how can we execute these PHP scripts simultaneously? Regards, Lisa Elita -- 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] db abstraction: sql design
Hi Michael, since U R using an abstraction-layer, most of Ur problems should be solved. U should have no problems if U reduce Ur SQL-statements to SQL92-standard. Greetinx, Mike Michael Rudel - Web-Development, Systemadministration - ___ Suchtreffer AG Bleicherstraße 20 D-78467 Konstanz Germany fon: +49-(0)7531-89207-17 fax: +49-(0)7531-89207-13 e-mail: mailto:[EMAIL PROTECTED] internet: http://www.suchtreffer.de ___ -Original Message- From: Michael P. Mehl [mailto:[EMAIL PROTECTED]] Sent: Tuesday, June 19, 2001 11:35 PM To: [EMAIL PROTECTED] Subject: [PHP-DB] db abstraction: sql design Hi! I'm new to this mailing list. So if this post is off-topic, please tell me and I will try to post it in other lists. I'm currently developing an intranet solutions targeted to run with several different SQL database system such as MySQL, PostgreSQL, Oracle, Microsoft SQL Server and so on. For the database abstraction I use the abstraction layer provided by the PEAR class collection. And for the design of the tables I use a software called DeZign for database (very good, by the way; more information at http://www.datanamic.com/). With this software it's possible to develop tables and to export a SQL script for creating those tables on several different database server, especially those mentioned above. The problem I have is how to develop SQL querys (SELECT, INSERT, UPDATE) that are compatible with all the SQL database I wrote about before. Does anyone know whether a software like DeZign is also available for the development of SQL querys? Or is there any _good_ resource on the internet comparing the syntax of _all_ the SQL implementations of databases? I didn't find any such information at all. Thanks a lot in advance! Michael -- 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] mssql_fetch_array problem
Hi Jennifer, I think that you want to display the Countryname in the DropDownBox, won't you ? Try this one (in your while-loop): if ($country == $myrow[countryid]) { print option value= . $myrow[countryid] . selected . $myrow[countryname] . /option . \n; } else { print option value= . $myrow[countryid] . . $myrow[countryname] . /option . \n; } Hope this helps. If not, plz post what is going wrong. Greetinx, Mike Michael Rudel - Web-Development, Systemadministration - ___ Suchtreffer AG Bleicherstraße 20 D-78467 Konstanz Germany fon: +49-(0)7531-89207-17 fax: +49-(0)7531-89207-13 e-mail: mailto:[EMAIL PROTECTED] internet: http://www.suchtreffer.de ___ -Original Message- From: Jennifer Arcino Demeterio [mailto:[EMAIL PROTECTED]] Sent: Tuesday, June 19, 2001 6:18 AM To: [EMAIL PROTECTED] Subject: [PHP-DB] mssql_fetch_array problem hello all, hope someone could help me it seems that the mssql_fetch_array did not work as it should when the data type to be fetch is an integer ... is there any work around for this? Below is my script ... $country_sql = select countryname, countryid from TBL_COUNTRY; if ($country_query = mssql_query($country_sql)) { while ($myrow = mssql_fetch_array($country_query)) if ($country == $myrow[countryid]) { print option value= . $myrow[countryid] . selected . $countryid . /option; } else { print option value= . $myrow[countryid] . . $countryid . /option; } } } Thanks! -- 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] Update Multiple records
Hi Ben, I think U can use: [...] where db_uid = '1' or db_uid = '2' ... OR [...] where db_uid in ('1', '2', ...) Hope this helps. Greetinx, Mike Michael Rudel - Web-Development, Systemadministration - ___ Suchtreffer AG Bleicherstraße 20 D-78467 Konstanz Germany fon: +49-(0)7531-89207-17 fax: +49-(0)7531-89207-13 e-mail: mailto:[EMAIL PROTECTED] internet: http://www.suchtreffer.de ___ -Original Message- From: Ben Cairns [mailto:[EMAIL PROTECTED]] Sent: Thursday, May 17, 2001 10:29 AM To: [EMAIL PROTECTED] Subject: [PHP-DB] Update Multiple records I want to update a MySQL db table, but I want to update multiple records, Like this: I want to run a statement like this: update weld_details set parent = '1' where db_uid = '1','2' Now, it dont work, and I cant see why, I think it has something to do with the numbers at the end of the statement. But I cant see what... Pls help. Thanks in advance. -- Ben Cairns - Head Of Technical Operations intasept.COM Tel: 01332 365333 Fax: 01332 346010 E-Mail: [EMAIL PROTECTED] Web: http://www.intasept.com MAKING sense of the INFORMATION TECHNOLOGY age @ WORK.. -- 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] Detect OS
$HTTP_USER_AGENT (if you're using Apache with PHP) should do what you need. ¥es, but not 100%, because there R thousands of different User-Agents out there, and the User-Agent of many browsers R customizable or Proxy's which R filtering them out. I think that U can use the $HTTP_USER_AGENT in 80%. Greetinx, Mike Michael Rudel - Web-Development, Systemadministration - ___ Suchtreffer AG Bleicherstraße 20 D-78467 Konstanz Germany fon: +49-(0)7531-89207-17 fax: +49-(0)7531-89207-13 e-mail: mailto:[EMAIL PROTECTED] internet: http://www.suchtreffer.de ___ -- 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] Filling mysql db with access db
Sorry for the late answer, but better too late than never =8) OK, there's a tool named access2mysql (but only on Unix). I think U can get it @ the mysql-web site. Hope this helps. Greetinx, Mike Michael Rudel - Web-Development, Systemadministration - ___ Suchtreffer AG Bleicherstraße 20 D-78467 Konstanz Germany fon: +49-(0)7531-89207-17 fax: +49-(0)7531-89207-13 e-mail: mailto:[EMAIL PROTECTED] internet: http://www.suchtreffer.de ___ -Original Message- From: Szii [mailto:[EMAIL PROTECTED]] Sent: Wednesday, May 16, 2001 6:28 PM To: Gabriel; [EMAIL PROTECTED] Subject: Re: [PHP-DB] Filling mysql db with access db Export as a comma-delimited file, explode() the file one line at a time along commas, and use insert via normal methods. Not sure if MySQL has a parser for comma-delim (probably does) but this way you have more control over how it goes in. -Szii - Original Message - From: Gabriel [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, May 16, 2001 8:47 AM Subject: [PHP-DB] Filling mysql db with access db How can i import data from an access database to a mysql db. Thanks in advance, Gabriel. -- 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] function login problem
Hi Greg, I can't C a call 2 Ur function login() in the below code-snipplet ... perhaps that's the clue ?? Greetinx, Mike Michael Rudel - Web-Development, Systemadministration - ___ Suchtreffer AG Bleicherstraße 20 D-78467 Konstanz Germany fon: +49-(0)7531-89207-17 fax: +49-(0)7531-89207-13 e-mail: mailto:[EMAIL PROTECTED] internet: http://www.suchtreffer.de ___ -Original Message- From: Greg K [mailto:[EMAIL PROTECTED]] Sent: Thursday, May 17, 2001 2:17 PM To: [EMAIL PROTECTED] Subject: [PHP-DB] function login problem I am creating a function called login, I have a main file called index.php .. which has my login form , it calls a login.php file, and in that login.php there is file include statement which calls config.php and that is where the function lie. This is my function , now if i don't set this as a function and just put it my login.php it works fine. But when I name the function in put it in my config.php no matter what I do all ways giving me the error You have entered an invalid username or password. I dont know if this has to do with passing of variables.. or what is going on but if something can please help me I would appreciate it .. Thank You function login() { $query=Select uname from members where pass='$pass'and uname='$username'; $result=mysql_query($query) or die(You are not authorized to be here.); $array= @mysql_fetch_array($result); $uname = $array[0]; if($uname==) { echo You have entered an invalid username or password; } else { echo You are logged in; $remote_address = getenv(REMOTE_ADDR); echo Your IP address is $remote_address.; } } -- 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] Url link
Hi Mark, have a look @ http://www.php.net/manual/en/function.stripslashes.php Greetinx, Mike Michael Rudel - Web-Development, Systemadministration - ___ Suchtreffer AG Bleicherstraße 20 D-78467 Konstanz Germany fon: +49-(0)7531-89207-17 fax: +49-(0)7531-89207-13 e-mail: mailto:[EMAIL PROTECTED] internet: http://www.suchtreffer.de ___ -Original Message- From: Mark @ 10base-t.com [mailto:[EMAIL PROTECTED]] Sent: Monday, May 14, 2001 10:03 PM To: [EMAIL PROTECTED] Subject: [PHP-DB] Url link Hey there, I'm trying to build NEXT/PREV buttons on my search page. The only way I know to do it so far is via an url. So the link I create is the following: http://monster/search1.php?offset=0submit=submittedwhere=his torical_yn%3D% 27N%27+and+fname+like+%27%25%25%27+and+lname+like+%27%25%25%27 +and+dept+like +%27%2510%25%27+and+locid+like+%27%25%25%27+ I'm passing the where= portion as a variable to my query string. $query = select blah from employee where $where order by blah limit blah But it makes the where section into this: select id, lname, fname, extension, locid, email from employee where historical_yn=\'N\' and fname like \'%%\' and lname like \'%%\' and dept like \'%10%\' and locid like \'%%\' order by lname limit 1,20 The problem is it's putting \'s in the where variable and it makes the query fail. Does anyone know how best to get rid of the \'s or a better way to do next/prev buttons? Thanks!!! Mark -- 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] Printing out usernames and logins
¥es, U R overwriting Ur result-set from the 1st qry. Store instead the 1st result into an array and iterate it then, sending your second select. U can also use 2 connections, but ... ? Greetinx, Mike Michael Rudel - Web-Development, Systemadministration - ___ Suchtreffer AG Bleicherstraße 20 D-78467 Konstanz Germany fon: +49-(0)7531-89207-17 fax: +49-(0)7531-89207-13 e-mail: mailto:[EMAIL PROTECTED] internet: http://www.suchtreffer.de ___ -Original Message- From: Jordan Elver [mailto:[EMAIL PROTECTED]] Sent: Monday, May 14, 2001 7:35 PM To: PHP DB List; PHP General List Subject: [PHP-DB] Printing out usernames and logins Hi, I'm trying to print out a list of usernames and the times they logged in. I want to print it out like: joe fred frank Then when you click on one of the names it show just there login times, like this, so if I click on fred it prints out: joe fred - login time - login time - login time frank But it doesn't continue printing out the rest of the usernames after it's finished printing freds logins. Any ideas would be appreciated. The code seems to have something to do with the second query, I think The code I'm using is below. Thanks, Jord db_connect(); $sql = SELECT id, username FROM users; $result = @mysql_query($sql); if(@mysql_num_rows($result) 0) { echo'This is a list of Members who have Logged In to their account with times and dates:BRBR'; while(list($id, $username) = mysql_fetch_array($result)) { echoA HREF=\$PHP_SELF?user=$usernameid=$id\$username/ABR\n; if($username == $user) { $sql = SELECT UNIX_TIMESTAMP(time) AS time FROM user_logins WHERE user_id = $id ORDER BY time DESC; $result = @mysql_query($sql); while(list($time) = mysql_fetch_array($result)) { echo date('h:i a l d F', $time).BR\n; } } } } else { echo error('No one has Logged In yet!'); } -- 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: AW: [PHP-DB] syntax error - -- agghhh!
it's always eaiser to count the parens and braces backwards to make sure they're all there. i do it all the time. ... or you use a cool Editor (like UE32) which will do this job for you =8) Greetinx, Mike (Germany) -- 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] How to select [please HELP]
... AND recordid NOT LIKE '$recordid' I think this will do the job. Greetinx, Mike Michael Rudel - Web-Development, Systemadministration - ___ Suchtreffer AG Bleicherstraße 20 D-78467 Konstanz Germany fon: +49-(0)7531-89207-17 fax: +49-(0)7531-89207-13 e-mail: mailto:[EMAIL PROTECTED] internet: http://www.suchtreffer.de ___ -Original Message- From: David Tandberg-Johansen [mailto:[EMAIL PROTECTED]] Sent: Wednesday, April 25, 2001 3:33 PM To: [EMAIL PROTECTED] Subject: [PHP-DB] How to select [please HELP] Hello! I am trying to select from a table where users add stuf. First I do: SELECT recordid,uid ,info FROM userstuff WHERE recordid LIKE '$recordid' Then I want to check if the user has more records in the table, based on the the first query SELECT recordid,uid,info FROM userstuff WHERE uid LIKE '$uid' AND NOT WHERE recordid LIKE '$recordid' But this query fails and I wonder if any one can give a hint on how. I tried the documentation on http://www.mysql.com but I found not anything that satisfied me. Thanks David -- 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] How to limit a WHILE statement?
Yes, LIMIT will do the job, but to answer your question: $x = 0; while ( ( $myrow = mysql_fetch_array( $result ) ) and ( ++$x 20 ) ) { [...] } Greetinx, Mike Michael Rudel - Web-Development, Systemadministration - ___ Suchtreffer AG Bleicherstrae 20 D-78467 Konstanz Germany fon: +49-(0)7531-89207-17 fax: +49-(0)7531-89207-13 e-mail: mailto:[EMAIL PROTECTED] internet: http://www.suchtreffer.de ___ -Original Message- From: Bob Stone [mailto:[EMAIL PROTECTED]] Sent: Tuesday, April 03, 2001 12:53 AM To: [EMAIL PROTECTED] Subject: [PHP-DB] How to limit a WHILE statement? Dear PHP Helpers, What is your recommendation on limiting a while statement so that it only iterates a maximum of 20 times? Here is the code snippet: $result = mysql_query($sql, $db); while ($myrow = mysql_fetch_array($result)) { printf("Name: bfont color=\"green\" size=\"5s\"%s %s %s %s\nbr/b/font", $myrow["salutation"], $myrow["first_name"], $myrow["mid_name"], $myrow["user_name"]); Best regards, Bob Stone __ Do You Yahoo!? Get email at your own domain with Yahoo! Mail. http://personal.mail.yahoo.com/?.refer=text -- 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] Auto load PHP
?php // Redirects to another Page using HTTP-META Tag function redirect( $url, $message = "", $delay = 0 ) { /* redirects to a new URL using meta tags */ echo "meta http-equiv='Refresh' content='".$delay."; url=".$url."'"; if ( !empty( $message ) ) die( "div style='font-family: Arial, Sans-serif; font-size: 12pt;' align=center ".$message." /div" ); } ? Greetinx, Mike Michael Rudel - Web-Development, Systemadministration - ___ Suchtreffer AG Bleicherstrae 20 D-78467 Konstanz Germany fon: +49-(0)7531-89207-17 fax: +49-(0)7531-89207-13 e-mail: mailto:[EMAIL PROTECTED] internet: http://www.suchtreffer.de ___ -Original Message- From: Renze Munnik [mailto:[EMAIL PROTECTED]] Sent: Tuesday, April 03, 2001 9:57 AM To: [EMAIL PROTECTED] Subject: Re: [PHP-DB] Auto load PHP David Balatero wrote: Maybe after the UPDATE statement, you could do: ?php header("Location: /path/to/other/script.php"); ? ...but I don't know, I don't use header() that much. -- David Balatero -Original Message- From: Jim Ray [mailto:[EMAIL PROTECTED]] Sent: Monday, April 02, 2001 6:23 PM To: [EMAIL PROTECTED] Subject: [PHP-DB] Auto load PHP Is there a way, once updating a table to load another PHP? After, I have the user click on the save button, the code calls a update routine. After the UPDATE is done, I want the code to call another progam. Thank you. Jim Yep... the header-function should work. There's only one nasty restriction... You can only use the header-function BEFORE ANY OTHER OUTPUT HAS BEEN GENERATED. -- * RzE: *** ** Renze Munnik ** ** E: [EMAIL PROTECTED] ** M: +31 6 218 111 43 *** -- 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] table 1 to table 2
I was thinking that MySQL doesn't support subselects ?! Or is there a new MySQL-Version which does support them ? Greetinx, Mike Michael Rudel - Web-Development, Systemadministration - ___ Suchtreffer AG Bleicherstrae 20 D-78467 Konstanz Germany fon: +49-(0)7531-89207-17 fax: +49-(0)7531-89207-13 e-mail: mailto:[EMAIL PROTECTED] internet: http://www.suchtreffer.de ___ -Original Message- From: Cal Evans [mailto:[EMAIL PROTECTED]] Sent: Monday, March 26, 2001 9:53 PM To: [EMAIL PROTECTED]; PHP-DB Subject: RE: [PHP-DB] table 1 to table 2 insert into table2 Select * from table1 where myConditionIsMet; Cal http://www.calevans.com -Original Message- From: Tobe Johnson [mailto:[EMAIL PROTECTED]] Sent: Monday, March 26, 2001 1:41 PM To: PHP-DB Subject: [PHP-DB] table 1 to table 2 Using PHP, I need to run a query against one MySQL database table (table1) and transfer the results into another identical MySQL database table (table2). Am I simply overlooking something simple on how to do this? Can someone give me input or direction on the best way to do this? Thanks in advance Tobe -- 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]
RE: [PHP-DB] MySQL manager
what about kmysql and kmysqladmin ?? Greetinx, Mike -Original Message- From: Rubanowicz, Lisa [mailto:[EMAIL PROTECTED]] Sent: Tuesday, March 27, 2001 4:34 PM To: 'Rosen'; [EMAIL PROTECTED] Subject: RE: [PHP-DB] MySQL manager www.mysqlfront.de I have used it and found it to be great. However I am a beginner and if there is a better product please let me know. All the best Lisa -Original Message- From: Rosen [mailto:[EMAIL PROTECTED]] Sent: Tuesday, March 27, 2001 3:26 PM To: [EMAIL PROTECTED] Subject: [PHP-DB] MySQL manager Hi, can anybody tell me for some cool MySQL database manager ? Thanks, Rosen Marinov -- 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] Another newbie question
OK, Matt, so you've got the basics =8). Your beginning is good, using the $Offset. Now you only have to add navigation-buttons (First, Previos, Next, Last) with html and a hidden field namded Offset. LIMIT is defined as a constant. You could also use your $Limit. here is a snippet of my navigation code: // // Event-Handler if ( isset( $Offset ) ) { // First-Button if ( isset( $First ) and !empty( $First ) ) { $Offset = 0; } // Next-Button if ( isset( $Next ) and !empty( $Next ) ) { if ( $Offset = ( $num_rows - LIMIT ) ) { $Offset += LIMIT; } } // Previous-Button if ( isset( $Prev ) and !empty( $Prev ) ) { if ( $Offset = LIMIT ) { $Offset -= LIMIT; } else { $Offset = 0; } } // Last-Button if ( isset( $Last ) and !empty( $Last ) ) { $Offset = ($num_rows - LIMIT); } } else { $Offset = 0; } // End Event-Handler // Hope this helps. If there are still questions ... ask =8) Greetinx, Mike Michael Rudel - Web-Development, Systemadministration - ___ Suchtreffer AG Bleicherstrae 20 D-78467 Konstanz Germany fon: +49-(0)7531-89207-17 fax: +49-(0)7531-89207-13 e-mail: mailto:[EMAIL PROTECTED] internet: http://www.suchtreffer.de ___ -Original Message- From: Matt Coyne [mailto:[EMAIL PROTECTED]] Sent: Monday, March 26, 2001 1:39 PM To: PHP DB Subject: [PHP-DB] Another newbie question Hi guys/gals Having had my head sorted out by this list already today, I am in need of some more help...!! I have an input form that, through php queries a MySQL db and passes results back and the browser displays them (at this stage just as a list). I have been looking into the LIMIT command to split my results into sections (ie results 1-10 then 11-20 etc). No problem in understanding how LIMIT works and I have LIMITed the first set to the first 10 results. I understand that to show results 11-20 I would use LIMIT 10, 10 in my SQL query. However, how am I to update the LIMIT n, 10 dynamically depending on what split of results they are viewing. ie How do I recall the SQL query but with an update LIMIT value Here is what I have been doing: // ASSEMBLE SQL QUERY // make the select $select = "SELECT ref, firstname, surname "; //add the tablename to the query $fromtable = "FROM $table_name"; //$fromtable .= "$tablename"; //build where clause $control=1; $where = " WHERE $control=1 "; //determine if field sent value, build statement if true if ($sex != '') { $Qsex = "AND sex = '$sex' "; } else { $Qsex = ""; } if ($heightFt != '') { $QheightFt = "AND heightFt = '$heightFt' "; } else { $QheightFt = ""; } if ($heightIn != '') { $QheightIn = "AND heightIn LIKE '$heightIn%' "; } else { $QheightIn = ""; } if ($neck != '') { $Qneck = "AND neck LIKE '$neck%' "; } else { $Qneck = ""; } if ($chest != '') { $Qchest = "AND chest LIKE '$chest%' "; } else { $Qchest = ""; } if ($waist != '') { $Qwaist = "AND waist LIKE '$waist%' "; } else { $Qwaist = ""; } if ($hips != '') { $Qhips = "AND hips LIKE '$hips%' "; } else { $Qhips = ""; } if ($leg != '') { $Qleg = "AND leg LIKE '$leg%' "; } else { $Qleg = ""; } if ($shoe != '') { $Qshoe = "AND shoe LIKE '$shoe%' "; } else { $Qshoe = ""; } if ($dress != '') { $Qdress = "AND dress LIKE '$dress%' "; } else { $Qdress = ""; } if ($hair != '') { $Qhair = "AND hair LIKE '$hair%' "; } else { $Qhair = ""; } if ($eyes != '') { $Qeyes = "AND eye LIKE '$eyes%' "; } else { $Qeyes = ""; } if ($skin != '') { $Qskin = "AND skin LIKE '$skin%' "; } else { $Qskin = ""; } if ($nationality != '') { $Qnationality = "AND nationality LIKE '$nationality%' "; } else { $Qnationality = ""; } // specify how results are ordered $orderby = "ORDER BY surname "; // offset is a hidden value in the initial form == 0 if ($offset = '0') { $offset = 0; } // specify LIMIT $limit = "LIMIT "; $limit .= $offset; $limit .= ", 10"; //build concatenated query $concatsql = $select; $concatsql .= $fromtable; $concatsql .= $where; $concatsql .= $Qsex; $concatsql .= $QheightFt; $concatsql .= $QheightIn
RE: [PHP-DB] Another newbie question
Ok, so you have to put the 'Offset-Event-Handler' prior to your select-statement. $Offset is calculatet by the event-handler and then you specify the LIMIT (already done in your skript): // specify LIMIT $limit = "LIMIT "; $limit .= $Offset; $limit .= ", 10"; ... here comes your query ... after displaying the results, build something like this (in HTML): FORM Name="Navigation" Action="?php echo $PHP_SELF; ?" Method="POST" INPUT Type="Submit" Name="First" Value="First" INPUT Type="Submit" Name="Prev" Value="Prev." INPUT Type="Submit" Name="Next" Value="Next" INPUT Type="Submit" Name="Last" Value="Last" INPUT Type="Hidden" Name="Offset" Value="?php echo $Offset; ?" /FORM ... so you have your $Offset (initially zero) stored in the hidden field. If you hit a Button, then the skript loads itself new and it has now the var's $Offset which will be new calculatet regarding of the Button you hit. Simple, ain't ?! 8)=) I hope, you're getting closer. BTW, there are ready Navigateable Recordset-Classes for results in http://phpclasses.upperdesign.com/ Greetinx, Mike -Original Message- From: Matt Coyne [mailto:[EMAIL PROTECTED]] Sent: Monday, March 26, 2001 3:22 PM To: PHP DB Subject: Re: [PHP-DB] Another newbie question Hi Michael Thanks for the prompt reply, much appreciated I can see where the code snippet is going. Creating values for $offset for the set of navigation buttons. But how do I use those values? I am stumped on (and am prolly just blinkered) how to make the query again from the nav button? If I am barking madly up the wrong tree, then I apologise. I'm not sure if I have covered the basics, more like I have learnt what I thought I needed as I went along. There are bound to be large gaping wholes in my knowledge, so further help is definitely required. TIA matt t h r e e z e r o : : : the mill, millstone lane, leicester, le1 5jn e : [EMAIL PROTECTED] :: m : 07747 845690 w : http://www.threezero.co.uk : : :t h r e e z e r o From: "Michael Rudel" [EMAIL PROTECTED] Reply-To: [EMAIL PROTECTED] Date: Mon, 26 Mar 2001 14:48:20 +0200 To: "'Matt Coyne'" [EMAIL PROTECTED], "'PHP DB'" [EMAIL PROTECTED] Subject: RE: [PHP-DB] Another newbie question OK, Matt, so you've got the basics =8). Your beginning is good, using the $Offset. Now you only have to add navigation-buttons (First, Previos, Next, Last) with html and a hidden field namded Offset. LIMIT is defined as a constant. You could also use your $Limit. here is a snippet of my navigation code: // // Event-Handler if ( isset( $Offset ) ) { // First-Button if ( isset( $First ) and !empty( $First ) ) { $Offset = 0; } // Next-Button if ( isset( $Next ) and !empty( $Next ) ) { if ( $Offset = ( $num_rows - LIMIT ) ) { $Offset += LIMIT; } } // Previous-Button if ( isset( $Prev ) and !empty( $Prev ) ) { if ( $Offset = LIMIT ) { $Offset -= LIMIT; } else { $Offset = 0; } } // Last-Button if ( isset( $Last ) and !empty( $Last ) ) { $Offset = ($num_rows - LIMIT); } } else { $Offset = 0; } // End Event-Handler // Hope this helps. If there are still questions ... ask =8) Greetinx, Mike Michael Rudel - Web-Development, Systemadministration - ___ Suchtreffer AG Bleicherstrae 20 D-78467 Konstanz Germany fon: +49-(0)7531-89207-17 fax: +49-(0)7531-89207-13 e-mail: mailto:[EMAIL PROTECTED] internet: http://www.suchtreffer.de ___ -Original Message- From: Matt Coyne [mailto:[EMAIL PROTECTED]] Sent: Monday, March 26, 2001 1:39 PM To: PHP DB Subject: [PHP-DB] Another newbie question Hi guys/gals Having had my head sorted out by this list already today, I am in need of some more help...!! I have an input form that, through php queries a MySQL db and passes results back and the browser displays them (at this stage just as a list). I have been looking into the LIMIT command to split my results into sections (ie results 1-10 then 11-20 etc). No problem in understanding how LIMIT works and I have LIMITed the first set to the first 10 results
RE: [PHP-DB] RE: [PHP] Printing MySQL into HTML Tables
Or try this one, its simple but more universal and very usefull for eg. testing. ... and a bit mor structured 8)=) ?php function result_all( $sql_result ) { echo "TABLE\n"; $columns = mysql_num_fields( $sql_result ); for ( $i = 0; $i $columns; $i++ ) { echo " TH ".mysql_field_name( $sql_result, $i )." /TH\n"; } while ( $row = mysql_fetch_row( $sql_result ) ) { echo " TR\n"; for ( $count = 0; $count $columns; ++$count ) echo " TD ".$row[$count]." /TD\n"; } echo " /TR\n"; } echo "/TABLE\n"; } ? Greetinx, Mike Michael Rudel - Web-Development, Systemadministration - ___ Suchtreffer AG Bleicherstrae 20 D-78467 Konstanz Germany fon: +49-(0)7531-89207-17 fax: +49-(0)7531-89207-13 e-mail: mailto:[EMAIL PROTECTED] internet: http://www.suchtreffer.de ___ -Original Message- From: Bart A. Verbeek [mailto:[EMAIL PROTECTED]] Sent: Thursday, March 22, 2001 11:37 PM To: PHP-DB mailinglist; [EMAIL PROTECTED] Subject: [PHP-DB] RE: [PHP] Printing MySQL into HTML Tables Hello, Using it myself to... Maybe this will help you out: !--BEGIN TABLE BORDER-- table width='90%' align='left' border='1'trtd !--BEGIN TABLE DATA-- table width='90%' align='left' trtd colspan='2'align='left' font color='#FF' face='Verdana' size='2'bblabla a headline here /b/font/td/tr tr !-- first tr for table with data -- ?php require ('dbconnect_includefile_with_passwd.inc'); $i=1; //this sets the counter to 1 $naam_nl = "%"; $result = mysql_query ("your query goes here to retrieve the data"); if ($row = mysql_fetch_array($result)) { do { echo "td width='50%'" . $row["1"] . "/td"; $i++; //the counter loops trough the do()while() and prints records if ($i==3) { echo "/trtr"; //when the counter reaches 3 it prints the row-end and new beginning. //don't forget to code the tr for the first row outside of the php-code $i=1; //sets the counter to one again and the loop starts all over } } while ($row = mysql_fetch_array($result)); } else {print ("Sorry, no record were found.");} ? /tr/table !--END TABLE DATA-- /td/tr/table !--END TABLE BORDER-- Hope thsi will help. Regards, Bart -Oorspronkelijk bericht- Van: Jeff Oien [mailto:[EMAIL PROTECTED]] Verzonden: donderdag 22 maart 2001 22:19 Aan: PHP Onderwerp: [PHP] Printing MySQL into HTML Tables I would like to do this with a MySQL database containing product information: trtdProduct 1 Info/tdtdProduct 2 Info/td/tr trtdProduct 3 Info/tdtdnbsp;/td/tr And if there are an odd number of products I want it to complete the table row with nothing in the cell. I want it to be able to automatically do this no matter how many products there are. I'm not sure how to set it up to print every other like that. Jeff Oien -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP 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] FATAL: emalloc(): Unable to allocate 2147483599 bytes
Hi Denis, try this one: $r=odbc_exec($x,"select 'a' as a_leter from some_table"); or $r=odbc_exec($x,"select \"a\" as a_leter from some_table"); which you prefer, but you have to escape the "" within a ""-String !! Hope this solves your problem. Greetinx, Mike Michael Rudel - Web-Development, Systemadministration - ___ Suchtreffer AG Bleicherstrae 20 D-78467 Konstanz Germany fon: +49-(0)7531-89207-17 fax: +49-(0)7531-89207-13 e-mail: mailto:[EMAIL PROTECTED] internet: http://www.suchtreffer.de ___ -Original Message- From: Denis Eltsov [mailto:[EMAIL PROTECTED]] Sent: Thursday, March 22, 2001 8:00 AM To: [EMAIL PROTECTED] Subject: [PHP-DB] FATAL: emalloc(): Unable to allocate 2147483599 bytes I use IIS5 - php4 (as CGI) - odbc connection to Access 2000 Everything was fine until I install MS SQL 2000 to the same machine. After this I receive such a message FATAL: emalloc(): Unable to allocate 2147483599 bytes every time I try to execute such a program ? $x=odbc_connect("oh","",""); $r=odbc_exec($x,"select "a" as a_leter from some_table"); ? or ? $x=odbc_connect("oh","",""); $r=odbc_exec($x,"select format("dd.mm.",date_field) from some_table"); ? Best regards Denis Eltsov -- 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] File Optimisation
Hi Steve, if your users have all JavaScript enabled, you could generate the HTML-Doc clientside, using things like document.write or document.writeln. Hope this helps. Greetinx, Mike Michael Rudel - Web-Development, Systemadministration - ___ Suchtreffer AG Bleicherstrae 20 D-78467 Konstanz Germany fon: +49-(0)7531-89207-17 fax: +49-(0)7531-89207-13 e-mail: mailto:[EMAIL PROTECTED] internet: http://www.suchtreffer.de ___ -Original Message- From: Steve Brett [mailto:[EMAIL PROTECTED]] Sent: Wednesday, March 14, 2001 5:02 PM To: [EMAIL PROTECTED] Subject: [PHP-DB] File Optimisation I have a calendar system that details the appointments for various departments in the company and am having problems with the sheers size of the html docs that are returned. One department insists that they nned to see all the users in one go (approx 110) and the calendars for 3 months. This causes an html doc being returned frm the server that is 3.5 meg. Whilst is takes the server 4 seconds to build and deliver this I was wondering if there is any way to speed things up and reduce the amount of network traffic. Would zipping the file b4 it is sent be a good (and easy) way to go ? Thanks in advance, Steve Brett Internal Development EMIS Ltd. "Privileged and /or Confidential information may be contained in this message. If you are not the original addressee indicated in this message (or responsible for delivery of the message to such person), you may not copy or deliver this message to anyone. In such case, please delete this message, and notify us immediately. Opinions, conclusions and other information expressed in this message are not given or endorsed by my firm or employer unless otherwise indicated by an authorised representative independently of this message." -- 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] Error prevention
Hi Martin, ... you forgot to 'mysql_fetch_row' or 'mysql_result'. Read about it in the PHP-Manual in the MySQL Functions. Greetinx, Mike Michael Rudel - Web-Development, Systemadministration - ___ Suchtreffer AG Bleicherstrae 20 D-78467 Konstanz Germany fon: +49-(0)7531-89207-17 fax: +49-(0)7531-89207-13 e-mail: mailto:[EMAIL PROTECTED] internet: http://www.suchtreffer.de ___ -Original Message- From: Martin Skjldebrand [mailto:[EMAIL PROTECTED]] Sent: Tuesday, March 13, 2001 5:05 PM To: [EMAIL PROTECTED] Subject: [PHP-DB] Error prevention I'm baffled (again ) In my mql database I'm doing: SELECT cl_login FROM client WHERE cl_login = "xxx"; and if "xxx" exists I get the result xxx while if it doesn't exist I get an empty string. In PHP I'm doing $querytest = "SELECT cl_login FROM client WHERE cl_login = '$txtLogin';"; $testresult = mysql_query($querytest, $mysql_link); if ($testresult) { print "Error: Client already in database."; exit; } Now, no matter what* I still get a result of the query: Resource id # 7 (i put in echo $testresult; when the routine didn't work). * That I get Resource id ... if I have a cl_login = xxx or if I don't have one. What's !#!"# going? How do I check for a duplicate before writing it to the database? (Short of putting UNIQUE on the table, which I suppose would result in an error). -- 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] parsing parameter over page
Hi andrie, have you tried to 'serialize()' and 'unserialize()' your object ?? look at the 'Miscellaneous functions' in the php-manual. hope this helps. Greetinx, Mike Michael Rudel - Web-Development, Systemadministration - ___ Suchtreffer AG Bleicherstrae 20 D-78467 Konstanz Germany fon: +49-(0)7531-89207-17 fax: +49-(0)7531-89207-13 e-mail: mailto:[EMAIL PROTECTED] internet: http://www.suchtreffer.de ___ -Original Message- From: andrie [mailto:[EMAIL PROTECTED]] Sent: Tuesday, March 06, 2001 6:05 PM To: [EMAIL PROTECTED] Subject: [PHP-DB] parsing parameter over page any body can help me ? i confuse about parsing paramater over php pages the paramater that i try to parse was a class variable. so if i defined $a = new myclass; in a.php. can i use that variable class in my b.php. is it possible for me to do that ? i've tried using cookies, but that cookies only known my $a as an object type, i cannot access it's values. TIA andRie -- 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] help can please some1 help me?
Buenos Dias, Pedro ! Have U tried the php-function htmlentities ?? For further information consult the Manuel (String Functions -- htmlentities) Greetinx, Mike (Germany) -Original Message- From: Pedro M. S. Oliveira [mailto:[EMAIL PROTECTED]] Sent: Thursday, March 01, 2001 8:59 PM To: PHP db Subject: [PHP-DB] help can please some1 help me? Hello all, i am making a php scrip that needs to convert special caracters html code and i've done a function to do that the prob is that this only work to the or caracteres and not the all the other special caracaters like for instance... can some1 see the code below and try do help me with this? here's what i have done: $word = $HTTP_GET_VARS["word"]; regexp($word); function regexp ($palavra) { $car[0] = ''; $car[1] = ''; $car[2] = ''; $car[3] = ''; $car[4] = ''; $car[5] = ''; $car[6] = ''; $car[7] = ''; $car[8] = ''; $car[9] = ''; $car[10] = ''; $car[11] = ''; $code[0] = 'ccedil;'; $code[1] = 'aacute;'; $code[2] = 'agrave;'; $code[3] = 'atilde;'; $code[4] = 'acirc;'; $code[5] = 'oacute;'; $code[6] = 'otilde;'; $code[7] = 'ocirc;'; $code[8] = 'iacute;'; $code[9] = 'uacute;'; $code[10] = 'eacute;'; $code[11] = 'ecirc;'; $palavra = strtolower ($palavra); for ( $i = 0 ; $i = 11 ; $i++ ) { $coded = eregi_replace ( $car[$i] , $code[$i] , $palavra ); } echo "Coded:"; echo $coded ; echo "br"; echo "Palavra:"; echo $palavra; echo "br"; } ? Procura: FORM ACTION="" METHOD="get" INPUT TYPE= "text" NAME = "word"br INPUT TYPE=submit Value = "Procurar" /form *** Pedro Miguel Silva Oliveira Cell Phone: +351 96 5867227 SMS: [EMAIL PROTECTED] 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] -- 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] How would you have liked to have invested in Yahoo when it was still a year old?
Its SPAM. Ignore it silently =8) ... or send an abuse mail to the sender's mail-provider. Greetinx, Michael Rudel - Web-Development, Systemadministration - ___ Suchtreffer AG Bleicherstrae 20 D-78467 Konstanz Germany fon: +49-(0)7531-89207-17 fax: +49-(0)7531-89207-13 e-mail: mailto:[EMAIL PROTECTED] internet: http://www.suchtreffer.de ___ -Original Message- From: Joe Brown [mailto:[EMAIL PROTECTED]] Sent: Thursday, March 01, 2001 9:19 PM To: [EMAIL PROTECTED] Subject: Re: [PHP-DB] How would you have liked to have invested in Yahoo when it was still a year old? Excuse me for my lack of understanding, but what does this have to do with php or databases? "Jess Ragaza" [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... or eBay? Well, I missed it too. Now we all have the great opportunity not only to relive it but also to help usher the real Information Highway and be rewarded for our vision and courage! Our company, Internet Architecture, Inc. will offer free web contents: true beginning applications of the Information Highway utilizing the much wider bandwidth of Digital Subscriber Line (DSL) and cable modems, supported by the latest satellite technology. These will be cutting edge technologies in virtual reality and spatial navigation applications: (1) "What if ..." situations for business and other decision making applications. This will be done in conjunction with the state of the art in artificial intelligence and virtual reality; (2) Spatial Navigation of roadways/topography/weather several miles ahead of your trip. This will be done with the help of Geopositioning and Weather Satellites; (3) floor plans and other design utilities. We have just successfully presented for the first time to a group of investors in Florida and will continue our pilgrimage as explained below to solicit financing for cutting edge technologies in virtual reality and spatial navigation applications.. Watch for the announcement in our web site for a presentation close to you. This will give you a unique opportunity to network and prospect as well. We are now presenting in the Washington, D.C./Virginia areas in February and March, 2001. We can be reached at 703-204-9698 and 321-287-7280. Attached is my recent offer of the same Multimedia presentation to individuals in key cities along my way. If you or anybody you know in your area may be interested, please respond. Or feel free to transmit this e-mail to anybody who may be interested. --- --- To: . Cc: . Subject: Now that my associate, the brilliant Mr. Fred Servillon, and I have given a fairly successful inaugural presentation of our company, to a group of investors in Tampa, I have decided to begin my expedition. First to the Washington, D.C. and Virginia areas per invitation of Amos and Ate Emelina Camp (Ate Emelina, my first cousin, is the eldest among the Ragaza clan), to the New York/New Jersey areas, to Chicago, to Fort Madison, Iowa, per invitation of my second cousin Johnny and his lovely wife, Dr. Cristina Rabo, and finally to the Sunnyvale/Palo Alto/Santa Clara areas. I will be leaving Florida on Saturday, January 27, 2001. Can you possibly arrange to have another such presentation in your area. It will be a multimedia presentation using MS PowerPoint superimposed against the already money-making web site http://www.internetarchitecture.com/ It will be not only educational (history of the internet, our competition Yahoo*, a new organizational concept that is similar to the internet, a bird's eye view of project development - systems planning, systems analysis, ..., etc.) but also creatively enjoyable. In Tampa we had so much fun (and boisterous, belly-aching laughter at times**) investigating various ... what if ... situations and the audience was actually actively participating in the solution and spontaneous humor! * This is a compelling story about the little train that could ... or David and GOLIATH ... check our business plan for introducing the following unproven free contents: virtual reality and spatial navigation, the real beginnings of the information highway. ** For example, one of the attendees loved the pulsating heart in the logo at the top of the menu/index on the left. When we visited the Playboy store, one of the occupants in our virtual mall, another attendee (a well known community leader here) noticed that suddenly the heart stopped beating! GOD really appears in mysterious ways?! Just below is the formal invitation we sent to the attendees of our inaugural presentation in Tampa. --- I am
AW: [PHP-DB] recursion
Hi Andrew, This works fine: // Prints out an array recursiv function print_array( $array, $seperator = "" ) { while ( list( $key, $val ) = each($array) ) { if ( is_array( $val ) ) { print_array( $val, $seperator." = ".$key ); } else { echo "$seperator = $key = $valBR\n"; } } echo "BR\n"; } Hope this helps. BTW: the [PHP-DB]-List isn't the right one for this question =8) Greetinx, Mike (Germany) -Ursprungliche Nachricht- Von: Andrew [mailto:[EMAIL PROTECTED]] Gesendet: Dienstag, 30. Januar 2001 09:18 An: PHP-DB Betreff: [PHP-DB] recursion Hi, Does PHP4 support recursive function ivocation? It seemed tome that it does not, because the code below doesn't work properly. function RecPrintDeps($arr, $depth=0){ //print_r($arr); $depth++; printf("H$deptha href=\"%s?dep=%s\"%s/a/H$depth", $HTTP_SELF, $arr[0], $arr[2]); while(list($k,$v)=each($this-$deptree)){ if($v[1]==$arr[0]) $this-RecPrintDeps($v,$depth); } } The function is a member of a class. Regards, Andrew Kozachenko Programmer Ukraine International Airlines -- 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]
AW: [PHP-DB] Viewing the DB
Hi Scott, Try: SELECT * FROM TAB ... it works with Oracle and Access, don't know what with other SQL-Servers. Greetinx, Mike (Germany) -Ursprngliche Nachricht- Von: Scott Fletcher [mailto:[EMAIL PROTECTED]] Gesendet: Mittwoch, 24. Januar 2001 16:40 An: [EMAIL PROTECTED] Betreff: [PHP-DB] Viewing the DB Does anyone know what is the sql command that would allow me to view all of the tables in the database? Scott -- 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]
AW: [PHP-DB] PHP4 + interbase 6 : UPDATE or INSERT has no effect
Hi Nicolas, ... don't you need a COMMIT on IB6-DB ??? Hope this helps. Greetinx, Mike (Germany) -Ursprngliche Nachricht- Von: nicolas [mailto:[EMAIL PROTECTED]] Gesendet: Montag, 22. Januar 2001 14:39 An: [EMAIL PROTECTED] Betreff: [PHP-DB] PHP4 + interbase 6 : UPDATE or INSERT has no effect I can't write into IB6 database from PHP4 with the folling code. I have no error but table1 is not updated. (SELECT queries run fine) ?php $host = "server1"; $database = "/opt/interbase/db/MaBase.gdb"; $login= "admin"; $password = "admin"; $c = ibase_connect( $host .":". $database, $login, $password); $sql = "UPDATE table1 SET champ1 = 'toto' "; ibase_query ($c, $sql ); ibase_close ( $c ); ? The problem is the same with INSERT. I haven't try DELETE yet. Regards Nicolas -- 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]
AW: [PHP-DB] delete working erratically on ODBC
Ciao Fabrizio, try to COMMIT after your first DELETE and then start the Second one and so on. Hope 'tll work. Greetinx, Mike (Germany) -Ursprngliche Nachricht- Von: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Gesendet: Freitag, 12. Januar 2001 16:39 An: [EMAIL PROTECTED] Betreff: [PHP-DB] "delete" working erratically on ODBC Hi All! I've a encountered a baffling problem in one project of mine. It's a data entry application build to work as a "stand-alone" app - it's all on a PC, built on Win98, PWS, PHP 4.0.3, and access 2000 as DB, accessed (pun not intended!) thru ODBC. I wished to delete all rows from a couple of tables, to start filling them anew. So I issued the following commands: [...] if (!isset($conn)) { $statusOpen=DB_Open($conn,$dbName); } if(!$statusOpen) die ("error in DB ".$dbName); $ji=odbc_exec($conn,"DELETE FROM table1"); echo "-$ji-br"; $ji=odbc_exec($conn,"DELETE FROM table2"); echo "-$ji-br"; [...] The two "echo"s are for debug purposes, obviously. Actually, no error condition is returned. On screen I see that both echo print a valid result ID. But the second DELETE is NOT executed! All rows all still there, after the execution. If I change the order of the query, i.e. [...] $ji=odbc_exec($conn,"DELETE FROM table2"); echo "-$ji-br"; $ji=odbc_exec($conn,"DELETE FROM table1"); echo "-$ji-br"; [...] Data in table2 are deleted, and data in table1 are still there! Even If I put some other query in the middle, it appears that only the first "DELETE" is really executed, while the other is silently ignored. Somebody has a clue on what's happening??? TIA, bye! /\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/ Fabrizio Ermini Alternate E-mail: C.so Umberto, 7 [EMAIL PROTECTED] loc. Meleto Valdarno Mail on GSM: (keep it short!) 52020 Cavriglia (AR) [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]