Re: [PHP-DB] !!!NO!!! IBM DB2 connectction problems !!!
HI! mea culpa... I didn't check it previously but now... I included . /usr/IBMdb2/V7.1/db2profile in /etc/init.d/httpd NOW IT WORKS!!! It was all about environment. THANKS ALL for advices/inspiration!!! -- 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] Using text files instead of a DB
ah ... apologies i was confused by the 'i want to pay by check' on an otherwise blank page. following the link does indeed give the offers you suggested. shame i'm in the uk ... once again, apologies abound. Steve -Original Message- From: Rick Emery [mailto:[EMAIL PROTECTED]] Sent: 13 March 2001 18:57 To: Steve Brett; [EMAIL PROTECTED] Subject: RE: [PHP-DB] Using text files instead of a DB Sir, you did NOT follow the link I mentioned: http://intercession.net/specialoffers. This offers the web-hosting at %59.40 for the year. Instead you followed the link on http://intercession.net. -Original Message- From: Steve Brett [mailto:[EMAIL PROTECTED]] Sent: Tuesday, March 13, 2001 10:53 AM To: Rick Emery; '[EMAIL PROTECTED]'; [EMAIL PROTECTED] Subject: RE: [PHP-DB] Using text files instead of a DB so ... Virtual Web Site Hosting* 250 MB - $199.99/year one time setup fee. if i divide 199 by 12 i get 5 -Original Message- From: Rick Emery [mailto:[EMAIL PROTECTED]] Sent: 13 March 2001 14:39 To: '[EMAIL PROTECTED]'; [EMAIL PROTECTED] Subject: RE: [PHP-DB] Using text files instead of a DB I use an ISP (http://intercession.net/specialoffers) who provides PHP and MySQL support on an Apache server (Cobalt Linux) for $5 per month...yes, $5 per month. No extra charges for either. $250 meg space. Full FTP. -Original Message- From: David W. Fenton [mailto:[EMAIL PROTECTED]] Sent: Monday, March 12, 2001 8:41 PM To: [EMAIL PROTECTED] Subject: Re: [PHP-DB] Using text files instead of a DB On 12 Mar 01, at 15:30, Phillip Bow wrote: It is absolutely possible though for anything big I would spring for the db access. PHP shares a lot of the functionality that makes Perl a good tool for this type of job so either language is a good choice. For PHP you will want to check out the f-functions(fopen, fread, fwrite), and some of the string manipulation functions(implode, explode, and ereg/preg). Your best bet may be to grab a book that covers string manipulation, and file handling(Wrox Professional PHP programming does I know) to use as reference. So, there's nothing on the web that demonstrates text-file manipulation? OK. I was hoping for an example somewhere that I could dig into and learn from, but if I have to buy a book, well, I'm still trying to figure out if PHP is what I want to use or not. I'm much more comfortable with Cold Fusion, though no more experienced. CF is much more compatible with what I already know and I got the same results with CF in about 1/3 the time it took me in PHP. Unfortunately, CF would require a change of ISP, and I really don't want to change ISPs (that would be a horrible thing, having been with the same ISP since the beginning of 1996). I don't think I want to spend money on a book for a platform that I may discard. Maybe I can negotiate with the ISP (I've done it before in behalf of clients). -- David W. Fenton | http://www.bway.net/~dfenton David Fenton Associates | http://www.bway.net/~dfassoc -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP-DB] log in script // php-auth_user php_auth-pw
Hi Does anyone have a simple php script for requiring entry of an email and password (settable by user) for access, that is logged in mysql for checking proper combination, and if new, creates new entry? I have a script that adds the info to database, but what I need to do: 1. is if the info is already in the database, then it logs user to specfic page, and 2. if not in database, then adds to db and then logs in to specific page, and 3. if wrong combo, then does not log in. can php_ auth_user and php_auth_pw help? Any help appreciated. -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP-DB] Apache + PHP4
Mario Henrique Cruz Torres wrote: Hello people, I have an Apache server running with PHP3, yesterday I installed PHP4, and changed httpd.conf to run php4 scripts, but when I try to see a php page, my browser asks if I want to download the file. Im want know how a httpd.conf file working with PHP4 looks like . My system is a Conectiva Linux ( REd Hat 5.0) with Apache 1.3.9 - and php4 and mod_php4 thanks a lot. Mario H.C.T. -- 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] Apache + PHP4
Mario: Ensure you have the following written similarly to this and UNCOMMENTED! snippet_of_httpd.conf # AddType allows you to tweak mime.types without actually editing it, or to # make certain files to be certain types. # # For example, the PHP3 module (not part of the Apache distribution) # will typically use: # AddType application/x-httpd-php-source .phps AddType application/x-tar .tgz AddType application/x-httpd-php .php3 AddType application/x-httpd-php .php AddType application/x-httpd-php .phtml /snippet_of_httpd.conf HTH :) Russ #---# "Believe nothing - consider everything" Russ Michell Anglia Polytechnic University Webteam http://gertrude.sipu.anglia.ac.uk/webteam [EMAIL PROTECTED] +44 (0)1223 363271 ext 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]
Re: [PHP-DB] log in script // php-auth_user php_auth-pw
Well a rather simple solution is: $R_Check=mysql_query("select email from table where email='$email' and password='$password'"); if(mysql_num_rows($R_Check)) { header("Location: log_in.php"); } else { $Error=""; $R_Check=mysql_query("select email from table where email='$email'"); if(mysql_num_rows($R_Check)) { $Error="Email exists!\n"; } $R_Check=mysql_query("select password from table where password='$password"); if(mysql_num_rows($R_Check)) { $Error.="Password exists!\n"; } if($Error) { header("Location: not_logged_in.php?error=$Error"); } else { // Add info to DB here // redirect with header() to proper page } } I wrote this from the top of my head so it might not be the best solution, or free from bugs for that matter 8), but it should give you a few pointers. You can turn this into a function to make it easier to maintain and use in multiple pages. Hope it helps. Best regards, Martin Edelius Spirex Digital Design WWW: http://www.spirex.se || MAIL: [EMAIL PROTECTED] PHONE: +46-31-514651, 0708-113711 || FAX: +46-31-514331 Ards Industrivg 3, S-422 43 Hisings Backa If I haven't got back to you or done what I'm supposed to, let me know again as I have too much to do for my own good... Got PHP4? http://www.php.net || http://www.zend.com - Original Message - From: "Marc Bragg" [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, March 14, 2001 1:22 PM Subject: [PHP-DB] log in script // php-auth_user php_auth-pw Hi Does anyone have a simple php script for requiring entry of an email and password (settable by user) for access, that is logged in mysql for checking proper combination, and if new, creates new entry? I have a script that adds the info to database, but what I need to do: 1. is if the info is already in the database, then it logs user to specfic page, and 2. if not in database, then adds to db and then logs in to specific page, and 3. if wrong combo, then does not log in. can php_ auth_user and php_auth_pw help? Any help appreciated. -- 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] Variable variables ! - help
I've got a loop which includes the following coming from mySQL if ($art_nr1 != '') { $i++; echo " td input type=\"hidden\" name=\"art_nr_$1\" value=\"$art_nr1\" input type=\"text\" name=\"quant$i\" size=\"3\" maxlength=\"5\" /td "; I've now got the following art_nr_1=12456 quant1="" or 1 or so And now comes the bit which doesn't work ! for ($i=1; $i50; $i++) : $varid = "quant".$i ; if ($$varid != "") { echo "input type=hidden name=\"art_nr\" value=\"$art_nr_$i\" input type=hidden name=\"quantity\" value=\"$quant$i\" "; } endfor; This gives the result input type=hidden name="art_nr" value="1" input type=hidden name="quantity" value="1" which is unfortunately not what I want ! I'm sure it's easy but can someone please help ! -- 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] Variable variables ! - help
Hi there: Not sure this'll work but it's some way towards it I would think: (Note all occurances of the variable: '$display_this' //Start off the display item outside the loop $display_this = "form"; if ($art_nr1 != '') { $i++; $display_this .= " td input type=\"hidden\" name=\"art_nr_$1\" value=\"$art_nr1\" input type=\"text\" name=\"quant$i\" size=\"3\" maxlength=\"5\" /td "; I've now got the following art_nr_1=12456 quant1="" or 1 or so And now comes the bit which doesn't work ! for ($i=1; $i50; $i++) : $varid = "quant".$i ; if ($$varid != "") { //Continue 'building up the varuable: $display_this .= "input type=hidden name=\"art_nr\" value=\"$art_nr_$i\" input type=hidden name=\"quantity\" value=\"$quant$i\" "; } endfor; //Echo thwe variable to the page ?php echo"$display_this"; ? #---# "Believe nothing - consider everything" Russ Michell Anglia Polytechnic University Webteam http://gertrude.sipu.anglia.ac.uk/webteam [EMAIL PROTECTED] +44 (0)1223 363271 ext 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]
Re: [PHP-DB] Variable variables ! - help
sorry I don't think I explained that very clearly ! The first loop's on a page which works fine, and it's in a form with article numbers and then an input field for quantites ! It's the next page that's giving me headaches ! The user submitted the form with all article numbers and some with a quantity ! And on the next page I just want to display/mail the article numbers with a quantity ! Hi there: Not sure this'll work but it's some way towards it I would think: (Note all occurances of the variable: '$display_this' //Start off the display item outside the loop $display_this = "form"; if ($art_nr1 != '') { $i++; $display_this .= " td input type=\"hidden\" name=\"art_nr_$1\" value=\"$art_nr1\" input type=\"text\" name=\"quant$i\" size=\"3\" maxlength=\"5\" /td "; I've now got the following art_nr_1=12456 quant1="" or 1 or so And now comes the bit which doesn't work ! for ($i=1; $i50; $i++) : $varid = "quant".$i ; if ($$varid != "") { //Continue 'building up the varuable: $display_this .= "input type=hidden name=\"art_nr\" value=\"$art_nr_$i\" input type=hidden name=\"quantity\" value=\"$quant$i\" "; } endfor; //Echo thwe variable to the page ?php echo"$display_this"; ? #---# "Believe nothing - consider everything" Russ Michell Anglia Polytechnic University Webteam http://gertrude.sipu.anglia.ac.uk/webteam [EMAIL PROTECTED] +44 (0)1223 363271 ext 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] Variable variables ! - help
driving me up the bloody wall ! I'm sure it's something simple ! This works fine for ($i=1; $i50; $i++) : $varid = "quant".$i ; if ($$varid != "") { echo " input type=hidden name=\"art_nr\" value=\"$art_nr_1\" input type=hidden name=\"quantity\" value=\"$quant1\" "; } but the moment I change it to $art_nr_$i it doesn't ??? sorry I don't think I explained that very clearly ! The first loop's on a page which works fine, and it's in a form with article numbers and then an input field for quantites ! It's the next page that's giving me headaches ! The user submitted the form with all article numbers and some with a quantity ! And on the next page I just want to display/mail the article numbers with a quantity ! Hi there: Not sure this'll work but it's some way towards it I would think: (Note all occurances of the variable: '$display_this' //Start off the display item outside the loop $display_this = "form"; if ($art_nr1 != '') { $i++; $display_this .= " td input type=\"hidden\" name=\"art_nr_$1\" value=\"$art_nr1\" input type=\"text\" name=\"quant$i\" size=\"3\" maxlength=\"5\" /td "; I've now got the following art_nr_1=12456 quant1="" or 1 or so And now comes the bit which doesn't work ! for ($i=1; $i50; $i++) : $varid = "quant".$i ; if ($$varid != "") { //Continue 'building up the varuable: $display_this .= "input type=hidden name=\"art_nr\" value=\"$art_nr_$i\" input type=hidden name=\"quantity\" value=\"$quant$i\" "; } endfor; //Echo thwe variable to the page ?php echo"$display_this"; ? #---# "Believe nothing - consider everything" Russ Michell Anglia Polytechnic University Webteam http://gertrude.sipu.anglia.ac.uk/webteam [EMAIL PROTECTED] +44 (0)1223 363271 ext 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] -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP-DB] Re: Interbase INSERTION error?
hey all.. I really don't get why I am getting this error.. Can somebody help me out? what does a parse error mean? Error: Parse error: parse error in /home/httpd/html/test/php-test/CVzenden.php on line 35 CVzenden.php: $conn=ibase_connect("localhost:/home/httpd/html/test/php-test/CV.gdb", "SYSDBA", "masterkey"); if (!$conn) { echo "Accesso Denied! $back"; exit; } $query="insert into PERSOON values ('0','$TITELVOOR','$ROEPNAAM','$VOORNAAM','$INITIALEN','$TUSSENVOEG','$ACHTERNAAM', '$TITELACHTER','$GESLACHT','$BURGSTAAT','$GEBOORTEDATUM','$GEBOORTEPLAATS','$NATIONALITEIT','$STRAAT','$HUISNR', '$POSTCODE','$PLAATSNAAM','$PROVINCIE','$LAND','$TELPRIVE','$TELWERK','$MOBIEL','$FAX','$BESCHIKBAAR','$EMAIL','NOW','NOW');"; $result=ibase_query($conn,$query); if (!$result) { echo "Error. Can't insert the record with the query: $query! $back"; exit; } echo "brbrRecord saved: $name $back"; ibase_close($conn); ? You forgot to tell Interbase into which fields te values should be inserted. Example: $query="insert into PERSOON(roepnaam,achternaam) values($ROEPNAAM,$ACHTERNAAM);
Re: [PHP-DB] Re: Interbase INSERTION error?
Technically, he shouldn't have to list the fields he is inserting into if he is inserting into the fields in order. Unless that's some funky Interbase requirement. A parse error is usually a PHP syntactical error. Can you post the whole of line "35" so we can see? :) --- Sean Finkel - [EMAIL PROTECTED] |H|eretik - Pain in the ass for Clan |H|avoc - http://www.webdrenalin.com/ubbcgi/ Webmaster - Rabid Wolf .:: Food For Your Brain ::. - http://www.rabid-wolf.com Lead Programmer - Data Admin and Data Lib - http://dadmin.sourceforge.net --- - Original Message - From: "Walter van der Velden" [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, March 14, 2001 2:29 PM Subject: [PHP-DB] Re: Interbase INSERTION error? hey all.. I really don't get why I am getting this error.. Can somebody help me out? what does a parse error mean? Error: Parse error: parse error in /home/httpd/html/test/php-test/CVzenden.php on line 35 CVzenden.php: $conn=ibase_connect("localhost:/home/httpd/html/test/php-test/CV.gdb", "SYSDBA", "masterkey"); if (!$conn) { echo "Accesso Denied! $back"; exit; } $query="insert into PERSOON values ('0','$TITELVOOR','$ROEPNAAM','$VOORNAAM','$INITIALEN','$TUSSENVOEG','$ACHTE RNAAM', '$TITELACHTER','$GESLACHT','$BURGSTAAT','$GEBOORTEDATUM','$GEBOORTEPLAATS' ,'$NATIONALITEIT','$STRAAT','$HUISNR', '$POSTCODE','$PLAATSNAAM','$PROVINCIE','$LAND','$TELPRIVE','$TELWERK','$MO BIEL','$FAX','$BESCHIKBAAR','$EMAIL','NOW','NOW');"; $result=ibase_query($conn,$query); if (!$result) { echo "Error. Can't insert the record with the query: $query! $back"; exit; } echo "brbrRecord saved: $name $back"; ibase_close($conn); ? You forgot to tell Interbase into which fields te values should be inserted. Example: $query="insert into PERSOON(roepnaam,achternaam) values($ROEPNAAM,$ACHTERNAAM); -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP-DB] 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-DB] what is connection id?
1. What is connection id? We will see this like "your mysql connection id is 12" when you enter into the mysql client programme. 2. Why will the connection id in mysql increase when you exit the mysql and login again? But I think the connection id should be cleared when user exit mysql. Thank you very much! -- 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
The first thing I would look at ( having had the same issue ) is whats actually in the document. I managed to reduce the size of data delivered by 60% by 2 methods. 1. Ruthless use of css in table formatting. 2. Creating javascript functions for even the smallest inline feature such as mouseovers. Regards Mark -Original Message- From: Steve Brett [mailto:[EMAIL PROTECTED]] Sent: Wednesday, March 14, 2001 4: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] 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] what is connection id?
AFAIK the connection id is a used by the server to identify the correct connection. if it reset itself there would be duplicate connections. e.g. user 1 connects and gets connection 1. user 2 connects and gets connection 2. then disconnects. if the connection index was reset user 2 would get connection 1 again. but what if user 1 is still using the system ? -Original Message- From: Fai [mailto:[EMAIL PROTECTED]] Sent: 14 March 2001 16:14 To: [EMAIL PROTECTED] Subject: [PHP-DB] what is connection id? 1. What is connection id? We will see this like "your mysql connection id is 12" when you enter into the mysql client programme. 2. Why will the connection id in mysql increase when you exit the mysql and login again? But I think the connection id should be cleared when user exit mysql. Thank you very much! -- 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
i've used both already. not so ruthless with the css and there is no java at all in there. just html. the db produces 15 sessions per working week for 100 users for 12 weeks so there is a fair chunk of data there ... -Original Message- From: Mark Newnham [mailto:[EMAIL PROTECTED]] Sent: 14 March 2001 16:11 To: [EMAIL PROTECTED] Subject: RE: [PHP-DB] File Optimisation The first thing I would look at ( having had the same issue ) is whats actually in the document. I managed to reduce the size of data delivered by 60% by 2 methods. 1. Ruthless use of css in table formatting. 2. Creating javascript functions for even the smallest inline feature such as mouseovers. Regards Mark -Original Message- From: Steve Brett [mailto:[EMAIL PROTECTED]] Sent: Wednesday, March 14, 2001 4: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] -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP-DB] Text Searches on MySQL
Hi, I'm putting together a db with articles in it. Would it be better to have two tables with the main text of the articles in it linked to a main article table or just chuck it all in together in one table. I want to be able to do a full text search on the articles. Any help please, Cheers, Jord -- 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
Steve, look at the output buffering/filtering methods in PHP (ob_) In particular, you can enable the gzip filter to automatically zip your html server side, assuming your user's browsers support auto gzip deflation, which the newer browsers seem to "Steve Brett" [EMAIL PROTECTED] wrote in message C05E7DA1218ED411BF8A00105AC95A8E01B1F3CF@SV-CNTRMAIL">news:C05E7DA1218ED411BF8A00105AC95A8E01B1F3CF@SV-CNTRMAIL... 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]
[PHP-DB] How to connect PHP with Oracle?
I have two machines: the first one runs Red Hat 7.0 with php 4.0.1pl2 (as it came in Red Hat 7.0 installation) and the other one runs Red Hat 7.0 with Oracle 8.1.6. I need to connect PHP with Oracle but when I run something like 'OCILogon(...)' I got a 'Call to undefined function: ocilogon()' Fatal Error. What do I have to do to have Oracle library installed in PHP and connect it with Oracle? Marcos Aurlio Alves W3 Tecnologia http://www.w3tecnologia.com E-folia http://www.e-folia.com.br -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP-DB] Any word about PHP and PROGRESS?
Hi all, Any news about connecting PHP to PROGRESS? I'm using PHP+APACHE+MYSQL and I'm curious. Thanks, == Hector M Banda Voice: (949) 784-3143 Progress Programmer/Analyst Fax: (425) 790-6379 Draper's Damon's -- 9 Pasteur -- Irvine Ca, 92618 == -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP-DB] Multiple rows returned ?. . .
Hi I have little tiny script like so.. - ? $dbName = "somedb"; $dbPass = "somepass"; $dbUserName = "someuser"; $host = "localhost"; $db = mysql_connect($host, $dbUserName, $dbPass) or die ("Could not connect to database"); mysql_select_db($dbName,$db); $sql = "SELECT * FROM downloads"; $result = mysql_query($sql, $db); $row = mysql_fetch_array($result); $row1 = mysql_fetch_array($result); ? --- no I know there has to be a more efficient way of returning the $row and $row1 without writing it down like so.. anyone one can throw me a clue? :) Thank Andre -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP-DB] Any word about PHP and PROGRESS?
Hi Hector, You may use OpenLink's ODBC drivers to do this. The drivers are available at http://www.openlinksw.com and a HOWTO on ODBC and PHP is at www.iodbc.org. Best regards, Andrew -- Andrew Hill - OpenLink Software Director Technology Evangelism eBusiness Infrastructure Technology http://www.openlinksw.com -Original Message- From: Hector Banda [mailto:[EMAIL PROTECTED]] Sent: Wednesday, March 14, 2001 1:16 PM To: [EMAIL PROTECTED] Subject: [PHP-DB] Any word about PHP and PROGRESS? Hi all, Any news about connecting PHP to PROGRESS? I'm using PHP+APACHE+MYSQL and I'm curious. Thanks, == Hector M BandaVoice: (949) 784-3143 Progress Programmer/Analyst Fax: (425) 790-6379 Draper's Damon's -- 9 Pasteur -- Irvine Ca, 92618 == -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP-DB] Evaluating T/F.
Hi-- I'm trying to evaluate the following lines to see if "$myrow" is false or true, can you help? - $sql = "SELECT * FROM Employees WHERE ID=$id"; $result = pg_exec($db, $sql) or die(include("../sqlerror.inc")); $myrow = pg_fetch_array($result,0) or die(include("../sqlerror.inc")); - Julio Cuz, Jr. Riverside Community College [EMAIL PROTECTED] -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP-DB] Evaluating T/F (2)
Hi-- Sorry, but I didn't finish my previous e-mail :) Hi-- I'm trying to evaluate the following lines to see if "$myrow" is false or true, can you help? - $sql = "SELECT * FROM Employees WHERE ID=$id"; $result = pg_exec($db, $sql) or die(include("../sqlerror.inc")); $myrow = pg_fetch_array($result,0) or die(include("../sqlerror.inc")); - Julio Cuz, Jr. Riverside Community College [EMAIL PROTECTED] -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP-DB] Evaluting T/F (3)
HI-- Sorry again...aggg... Hi-- I'm trying to evaluate the following lines to see if "$myrow" is false or true, can you help? - $db .; $sql = "SELECT * FROM Employees WHERE ID=$id"; $result = pg_exec($db, $sql); $myrow = pg_fetch_array($result,0) or die(include("../sqlerror.inc")); - Julio Cuz, Jr. Riverside Community College [EMAIL PROTECTED] -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP-DB] Javascript and PHP
Morning !!! experts Sorry its lil bit off list question but u r the experts remember ! Is there nething in php similar to javascript's following code ??: document.form1.text1.value = ? so that i can fetch the value of any textbox into php variable [$var] thx in advance. Vivek -D-AND GATE -|O--Complement ? -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP-DB] informix client sdk for linux
Hello Anybody know where i can get hold of this. Informix site at www.informix.com/evaluate..has for every OS other than Linux Thanks Marios -- 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] loading csv file into database located in a local server using phpadmin ! Bug or What!
I get this too, but it's a problem thats only recently developed - import from cvs has worked fine previously. I had thought it may be connected with a recent upgrade to a newer version of the server I'm using (Omnihttpd Pro) which I think also came with a newer version of PHP (its now 4.04pl1).. Can you give more details of which server and which version of PHP you are using? Anyone else?? Alan Geetha wrote: Using phpadmin, when I try to import a csv file into a database table, I get the following mysql errorcode:2 error which says the following file is not found: c:windowstempphp48.. Appreciate any help... Thanks. Geetha -- 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] Using text files instead of a DB
Does your ISP have XML and Sabloton support installed for PHP? If so it would be worth considering an XML solution. Alan Hale "David W. Fenton" wrote: I'm very new to PHP, and don't know where to look to answer this question. Is it possible to use a collection of delimited text files with PHP instead of a database engine? I'm trying to save $50/month, which is what MySQL support costs from my ISP (can't move ISPs). The application is a simple form-driven search function, having three multi-select listboxes that would be populated from three text files as criteria to pull records from a single text file. Would such a setup require PERL or the like? And, if so, would it be better to build the whole thing in PERL (which I don't know, either)? Any pointers to information on the subject gratefully received. -- David W. Fenton |http://www.bway.net/~dfenton David Fenton Associates |http://www.bway.net/~dfassoc -- 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] Text Searches on MySQL
At 05:05 PM 3/14/2001 +, you wrote: I'm putting together a db with articles in it. Would it be better to have two tables with the main text of the articles in it linked to a main article table or just chuck it all in together in one table. I want to be able to do a full text search on the articles. You cannot index "TEXT" fields in MySQL so doing a full text search is slow if you have any amount of data in your database (it needs to search every record for every search). The way I normally handle this is to create a second table of "words" which includes every word in a given article (that isn't in a stop word list) along with the original article ID so that I can index the strings. This makes a search very quick but adds the expense of disk space and slows the adding of data initially. You will have to decide whether in your case it matters. If you have little data then no big whoop. If you have lots of data then you need to look at different method of searching. Cheers, Ron - Island Net AMT Solutions Group Inc. Telephone: 250 383-0096 1412 Quadra Toll Free:1 800 331-3055 Victoria, B.C. Fax:250 383-6698 V8W 2L1 E-Mail:[EMAIL PROTECTED] Canada WWW: http://www.islandnet.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-DB] PHP how to compare?
Can somebody tell me what the proper statement is for this? I want two variables to match with eachother but this doesn't seems to work. Help please? THNX if ($PASS != $PASSNOG) { echo "password doesn't match! $back"; exit; } Duky -- 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] PHP how to compare?
Duky, Have you tried to use: if ($PASS == $PASSNOG) { # do whatever. } If you're taking data from a form, you might want to do a trim to remove any trailing spaces if ($PASS == trim($PASSNOG)) { # do whatever } There's also... http://www.php.net/manual/en/function.strcmp.php HTH, Chris -Original Message- From: Duky [mailto:[EMAIL PROTECTED]] Sent: Wednesday, March 14, 2001 11:34 AM To: [EMAIL PROTECTED] Subject: [PHP-DB] PHP how to compare? Can somebody tell me what the proper statement is for this? I want two variables to match with eachother but this doesn't seems to work. Help please? THNX if ($PASS != $PASSNOG) { echo "password doesn't match! $back"; exit; } Duky -- 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] PHP how to compare?
I'm assuming these are strings you are comparing, correct? If so, try this: if(strcmp($PASS, $PASSNOG)) { echo "password doesn't match! $back"; exit; } http://www.php.net/manual/en/function.strcmp.php Josh Hoover KnowledgeStorm, Inc. [EMAIL PROTECTED] Searching for a new IT solution for your company? Need to improve your product marketing? Visit KnowledgeStorm at www.knowledgestorm.com to learn how we can simplify the process for you. KnowledgeStorm - Your IT Search Starts Here Can somebody tell me what the proper statement is for this? I want two variables to match with eachother but this doesn't seems to work. Help please? THNX if ($PASS != $PASSNOG) { echo "password doesn't match! $back"; exit; } Duky
RE: [PHP-DB] PHP how to compare?
Duky, Did you check if you have named correctly your variables in your form? Your statement is more than corret. Try "echoing" your variables before making the comparision to verify if they are set. If not probabily you have a spelling problem on the form variables. BR, Fbio Ottolini P.S.: The correct list for these issues is [EMAIL PROTECTED] -Original Message- From: Duky [mailto:[EMAIL PROTECTED]] Sent: Wednesday, March 14, 2001 4:34 PM To: [EMAIL PROTECTED] Subject: [PHP-DB] PHP how to compare? Can somebody tell me what the proper statement is for this? I want two variables to match with eachother but this doesn't seems to work. Help please? THNX if ($PASS != $PASSNOG) { echo "password doesn't match! $back"; exit; } Duky -- 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] Javascript and PHP
Well, No and Yes. If the form is posted, whichever page that it was posted too will have $HTTP_POST_VARS["text1"] set to whatever was in the textbox. $text1 may also be a global variable, depending on your php.ini settings for register_globals and also variable_order. It took me a while to feel comfortable with the web client/server conversation. PHP has no way of chatting with a client after a page has been sent. During the page request process, if a post was submitted from the client variables will be sent via $HTTP_GET_VARS, $HTTP_PUT_VARS and/or $HTTP_POST_VARS depending on how the form is configured. "vivekmisra" [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... Morning !!! experts Sorry its lil bit off list question but u r the experts remember ! Is there nething in php similar to javascript's following code ??: document.form1.text1.value = ? so that i can fetch the value of any textbox into php variable [$var] thx in advance. Vivek -- -- -D-AND GATE -|O--Complement ? -- -- -- 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] Javascript and PHP
Assume in HTML file is: FORM name="myform" method="post" action="http://my_site.com/do_form.php3" INPUT type="text" name="text1" /FORM Then, in do_form.php3: ?php the_value = $text1; ? $text1 refers to the name of the field in the HTML form. This convention applies to all fields in the form, including checkboxes, radio buttons, submit buttons, etc. -Original Message- From: vivekmisra [mailto:[EMAIL PROTECTED]] Sent: Tuesday, March 13, 2001 12:40 PM To: [EMAIL PROTECTED] Subject: [PHP-DB] Javascript and PHP Morning !!! experts Sorry its lil bit off list question but u r the experts remember ! Is there nething in php similar to javascript's following code ??: document.form1.text1.value = ? so that i can fetch the value of any textbox into php variable [$var] thx in advance. Vivek -D-AND GATE -|O--Complement ? -- 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] PHP how to compare?
The variables are the right ones... "Fabio Ottolini (EDB)" wrote: Duky, Did you check if you have named correctly your variables in your form? Your statement is more than corret. Try "echoing" your variables before making the comparision to verify if they are set. If not probabily you have a spelling problem on the form variables. BR, Fbio Ottolini P.S.: The correct list for these issues is [EMAIL PROTECTED] -Original Message- From: Duky [mailto:[EMAIL PROTECTED]] Sent: Wednesday, March 14, 2001 4:34 PM To: [EMAIL PROTECTED] Subject: [PHP-DB] PHP how to compare? Can somebody tell me what the proper statement is for this? I want two variables to match with eachother but this doesn't seems to work. Help please? THNX if ($PASS != $PASSNOG) { echo "password doesn't match! $back"; exit; } Duky -- 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] PHP how to compare?
Hi Duky Try to add this before if statement echo("$PASSbr$PASSNOG"); it will show you whether your vars are correct and whether there is something in at all! if ($PASS != $PASSNOG) { echo "password doesn't match! $back"; exit; } Good luck Ivo "Duky" [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... Can somebody tell me what the proper statement is for this? I want two variables to match with eachother but this doesn't seems to work. Help please? THNX if ($PASS != $PASSNOG) { echo "password doesn't match! $back"; exit; } Duky -- 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] PHP and MySQL
Hi, my exact problem is the following. Here is my form : div align="left"login : input type="text" name="field[0]" /div br div align="left"group : input type="text" name="field[1]" /div br div align="left"password : input type="text" name="field[2]" /div when I put the data in the table, I get either "field[i]" or array. I can't use more specific names than field[$i] bacause I get the name of the fiels directly from my table (so my script enables to update any table without knowing how it is written). Laurent -- 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] Sure it's simple but.............
I don't understand. What is your question? Robert Zwink -Original Message- From: Keith Whyman [mailto:[EMAIL PROTECTED]] Sent: Tuesday, March 13, 2001 11:32 AM To: [EMAIL PROTECTED] Subject: [PHP-DB] Sure it's simple but. I've got a several links(each with a seperate article number) on a page which call the following cms/offer.php?new=yes offer.php is only offers except when new exists when new.php is included Up to here no problems but in new I've got a loop which includes a form field. I want this form field with a value but only for the correct article from which the link comes ! Database query is SELECT DISTINCT ID,Heading,Text,Art_Nr1,Descript1,Price1,Art_Nr2,Descript2,Price2,Art_Nr3,De script3,Price3,Geschaltet,What,DateTime FROM trial WHERE (Geschaltet = '1' ) AND (What ='offer') ORDER BY DateTime Result is so if ($result1) { while ($r = mysql_fetch_array($result1)) { $heading = $r["Heading"]; $text = $r["Text"]; $art_nr1 = $r["Art_Nr1"]; $descript1 = $r["Descript1"]; $price1 = $r["Price1"]; $art_nr2 = $r["Art_Nr2"]; $descript2 = $r["Descript2"]; $price2 = $r["Price2"]; $art_nr3 = $r["Art_Nr3"]; $descript3 = $r["Descript3"]; $price3 = $r["Price3"]; $free =$r["Geschaltet"]; $id = $r["ID"]; and then everything justs get echoed onto the screen if ($art_nr1 != '') { echo " input type=\"text\" name=\"$art_nr1\" size=\"3\" maxlength=\"5\" value=\"1\" Anyone got any clever ideas ? Thanks Keith -- 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] SHOW COLUMNS
Use: echo mysql_field_name($result, $i); Like this: ?php require("Connection.php"); $query="Show Columns from Inventory"; $result= mysql_query($query); while ($row = mysql_fetch_row($result)); { for ($i =1;$imysql_num_fields($result);$i++) //{echo $row[$i]; -- This won't work {echo mysql_field_name($result, $i); }} ? Robert Zwink DISCLAIMER This is not my syntax, it is taken from the original poster's message. -Original Message- From: Mike [mailto:[EMAIL PROTECTED]] Sent: Tuesday, March 13, 2001 7:31 PM To: [EMAIL PROTECTED] Subject: [PHP-DB] SHOW COLUMNS Im trying to use the SHOW COLUMNS Syntax from mysql in the folowing code. It is returning nothing.The Table name is correct and there are records in the table (not that that should matter).I dont get an error.I posted to php.general and got no response. ?php require("Connection.php"); $query="Show Columns from Inventory"; $result= mysql_query($query); while ($row = mysql_fetch_row($result)); { for ($i =1;$imysql_num_fields($result);$i++) {echo $row[$i]; }} ? THANKS Mike P [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] PHP how to compare?
even better to use: echo("\$PASS = $PASSbr\$PASSNOG = $PASSNOG"); which will show the variable name whether it has anything defined or not. Terry On Wednesday, March 14, 2001, at 03:21 PM, Ivo Stoykov wrote: Hi Duky Try to add this before if statement echo("$PASSbr$PASSNOG"); -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP-DB] Showing source code with phps
On my Linux RH 6.2 computer, when working with Apache, mySQL and PHP, there is no problems showing the source code to my code developing friends. If I rename the php-file to phps it works just well. BUT, when doing the very same thing on my W98 or W2k machines, the source code will not show. The configuration is the same in httpd.conf and I've checked it out. Is this problem known? Does not the W32 platform support phps? Anders Pettersson -- 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] Using text files instead of a DB
This following script might help. It assumes you are reading in a file with the following format: 0;this is line zero 1;this is a line one 2;this is a line two 3;this is a line three 4;this is a line four 5;this is a line five ?php // get a the file into an array, you wouldn't want to do this for a very big file // I tried it with a file 4000+ lines and it seemed to work just fine // if you know the file will be big then we would read only a limited number of lines // at a time using fopen() and fgets() $fcontents = file ('products.txt'); // I provide the following variable ($method) in the url // For example: // http://www.yoursite.com/index.phtml?method=idproduct_id=123 if($method == "id"){ // Loop through the file trying to match the begining // of a line with the desired id while (list ($line_num, $line) = each ($fcontents)) { if(ereg("^".$keyword, $line)){ echo "bLine $line_num:/b " . htmlspecialchars ($line) . "br\n"; } } // keywords are seperated by | (pipe) // For example: // http://www.yoursite.com/index.phtml?method=searchkeyword=black|piano|mozart }elseif($method == "search"){ while (list ($line_num, $line) = each ($fcontents)) { // Notice the use of eregi() for the keyword part // it allows for case-insensitive searches if(eregi($keyword, $line)){ echo "bLine $line_num:/b " . htmlspecialchars ($line) . "br\n"; } } }else{ // supply a method, or do not run } ? Robert Zwink -Original Message- From: David W. Fenton [mailto:[EMAIL PROTECTED]] Sent: Wednesday, March 14, 2001 12:02 AM To: [EMAIL PROTECTED] Subject: RE: [PHP-DB] Using text files instead of a DB On 13 Mar 01, at 9:43, Robert V. Zwink wrote: http://phpclasses.upperdesign.com/browse.html/package/52 Thanks for this. Very simple and straightforward, but I don't see much in there that helps me. The above link will take you to a class to manipulate CSV files. This might help you understand file access in php. If you want to maintain a database within a text file using CSV file format may help. There is not (and will never be) any editing of this text file on the website. It's simply read-only, a periodically uploaded catalog of selected items to allow website viewers to search selected inventory on this client's website: http://www.wurlitzerbruck.com/. If you have specific questions don't hesitate to post. [Keep in mind that I'm an experienced Visual Basic programmer but I've never done very much file I/O and I'm a complete newbie to PHP with no PERL experience, either] I can open the file with fgetcsv(), and there it all is in an array, which is very nice. However, what I really want is to pull only rows matching certain criteria into an array and then display *those*. I've created the data output as a flat file, with the many-to-one data flattened into single fields. [am I correct in surmising that the array created by fgetcsv() is addressable only by index number, and not by column name?] I need to match on: CreatorID (one per row, exact match) CreatorCategories (multiple items per row, match multiple partial strings) KeyWords (multiple items per row, match partial string) Title (one per row, partial match against a concatenation of three columns) The WHERE clause from my ODBC SQL strings would run like this: WHERE (CreatorID IN (232,654,1034)) AND (CreatorCategories Like '%Composer%' OR CreatorCategories Like '%Pianist%') AND (KeyWords Like '%Ballet%' OR KeyWords Like '%Cantatas%' OR KeyWords Like '%Chamber Music%') AND ((BibHeader AutoHeader OtherHeader) Like 'Sonata%') (the example makes no sense, of course, but includes all the possibilities). Now, obviously, I need a regular expression to compare a field value to a list of values, and another to see if any of a list of values is a substring of the field value. Regular expressions always make my eyes glaze over, but these are so simple (aren't they?) that I can't see any examples that I can understand are applicable to what I want -- the examples all seem designed to help you with more complicated tasks than what I need. And, obviously, I want to return just the rows that have a match. If I have the whole file in an array (with fgetcsv()), the row number of the array should be all I need to return, and then I can copy that whole row into a second array. What I'd really like is a way that would selectively copy to an array rather than copying from one big array to a smaller array, but the file has to be open, in memory, either way, right? Or can one read it in one line at a time, test against the conditions, and copy to the array or move on depending on the match? Once the selected rows are in an array, I'm set, since that's a piece of
Re: [PHP-DB] Help w/ displaying return vals
Use mysql_function(...) or die( mysql_error()) on every mysql function or command you're performing, this will tell you what is going wrong . HTH Jayme. -Mensagem Original- De: [EMAIL PROTECTED] Para: [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Enviada em: quarta-feira, 14 de maro de 2001 19:47 Assunto: [PHP-DB] Help w/ displaying return vals Here's my php program, I think $result never gets assigned a value, staying null or whatever. $link = mysql_connect("host"); mysql_select_db("dbname"); $result = mysql_query ("SELECT * FROM table"); $fields = mysql_num_fields ($result); $rows = mysql_num_rows ($result); $table = mysql_field_table ($result, $i); echo "Your '".$table."' table has ".$fields." fields and ".$rows." records BR" - - EOP - - The problem comes on the lines that reference the variable $result. I keep getting this in the browser... leading me to believe that $result is null: Warning: Supplied argument is not a valid MySQL result resource help! Thankx0r Ryan -- 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] PHP how to compare?
Hmm.. maybe I wasn't clear enough... what I want is to check is WHEN the two passwords aren't the same, then it should echo "password doesn't match!". So when NOT the same, then echo. What to use for the NOT?? should it then be something like this with the exlamationmark? if ($PASS !== $PASSNOG) { echo "password doesn't match! $back"; exit; } Duky Duky wrote: Can somebody tell me what the proper statement is for this? I want two variables to match with eachother but this doesn't seems to work. Help please? THNX if ($PASS != $PASSNOG) { echo "password doesn't match! $back"; exit; } Duky -- 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] PHP how to compare?
use just one = sign. So, if ($PASS != $PASSNOG) {... At 01:41 AM 3/15/01 +0100, Duky wrote: Hmm.. maybe I wasn't clear enough... what I want is to check is WHEN the two passwords aren't the same, then it should echo "password doesn't match!". So when NOT the same, then echo. What to use for the NOT?? should it then be something like this with the exlamationmark? if ($PASS !== $PASSNOG) { echo "password doesn't match! $back"; exit; } Duky Duky wrote: Can somebody tell me what the proper statement is for this? I want two variables to match with eachother but this doesn't seems to work. Help please? THNX if ($PASS != $PASSNOG) { echo "password doesn't match! $back"; exit; } Duky -- 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] -- http://www.mossroot.com/index.php AIM Handle: Buffalo2K e-mail: [EMAIL PROTECTED] "When you lose the power to laugh at yourself, you lose the power to think straight." --Clarence Darrow -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP-DB] What is the life time of mysql connection if I use pconnect()
From the document, the connection opened by pconnect() will not close after you use. And it will store it and reuse at next time. I would like to ask, it is keep open until I shutdown apache? -- 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] 2 while loops - 2 tables
If the tables have a one to many relationship you can use nested while loops: while(1st loop){ // display header - master table while(2nd loop){ // display features - detail table } } HTH Jayme. -Mensagem Original- De: olinux [EMAIL PROTECTED] Para: PHP-DB [EMAIL PROTECTED] Enviada em: quinta-feira, 15 de maro de 2001 01:05 Assunto: [PHP-DB] 2 while loops - 2 tables I am trying to display info from 2 tables in a search result format. My problem is... how do I get the variables to display together? for example: A user selects a city to search apartments in. $sql = "SELECT * FROM $table_name WHERE apt_city = \"$apt_city\" "; $result = mysql_query($sql, $connection); while ($row = mysql_fetch_array($result)) { $aptID = $row['aptID']; $apt_address1 = $row['apt_address1']; $apt_address2 = $row['apt_address2']; $apt_zip = $row['apt_zip']; } while ($row = mysql_fetch_array($result)) { $apt_ID = $row['apt_ID']; $feature1 = $row['feature1']; $feature2 = $row['feature2']; $feature3 = $row['feature3']; } Now I want to display the approriate data from the apartment next to the features. so What I am wondering is how can i "group" the appropriate features with the correct apartment so say a result may look like this [HTML table] __ Apartment 1 | feature1 apt_address1 | feature2 apt_address2 | feature3 _|_ Apartment 2 | feature1 apt_address1 | feature2 apt_address2 | feature3 _|_ Apartment 3 | feature1 apt_address1 | feature2 apt_address2 | feature3 _|_ Should the 2nd while loop be placed inside the first? while ($row = mysql_fetch_array($result)) { $aptID = $row['aptID']; $apt_address1 = $row['apt_address1']; $apt_address2 = $row['apt_address2']; $apt_zip = $row['apt_zip']; while ($row = mysql_fetch_array($result)) { $apt_ID = $row['apt_ID']; $feature1 = $row['feature1']; $feature2 = $row['feature2']; $feature3 = $row['feature3']; } $table_block .= "[ this contains HTML code for table rows to display data ]"; } Thanks Much! olinux -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP-DB] i want to join
hi there __ Do You Yahoo!? Yahoo! Auctions - Buy the things you want at great prices. http://auctions.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-DB] Load file
I'm trying to read a text file into a blob field in a database with the following code: $cvfile=".txt"; $exist = file_exists($cvfile); echo "File exists $existBR"; $result1=mysql_query("select * from $TA"); $rows=mysql_num_rows($result1); echo "$rowsBR"; $result=mysql_query("update $TA set P1description = load_file($cvfile)") or die (mysql_error()); Output shows File exists 1 (which I assume menas True) and the table is being read because $rows equals 2. P1 Then I get the "You have an error in your SQL syntax near '(.txt)' at line 1" error Any help? Regards Mick Lloyd [EMAIL PROTECTED] Tel: +44 (0)1684 560224 -- 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 connect PHP with Oracle?
Check out : http://www.weberdev.com/index.php3?GoTo=ViewArticle.php3?ArticleID=17 Sincerely berber Visit http://www.weberdev.com Today!!! To see where PHP might take you tomorrow. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Wednesday, March 14, 2001 7:19 PM To: [EMAIL PROTECTED] Subject: [PHP-DB] How to connect PHP with Oracle? I have two machines: the first one runs Red Hat 7.0 with php 4.0.1pl2 (as it came in Red Hat 7.0 installation) and the other one runs Red Hat 7.0 with Oracle 8.1.6. I need to connect PHP with Oracle but when I run something like 'OCILogon(...)' I got a 'Call to undefined function: ocilogon()' Fatal Error. What do I have to do to have Oracle library installed in PHP and connect it with Oracle? Marcos Aurlio Alves W3 Tecnologia http://www.w3tecnologia.com E-folia http://www.e-folia.com.br -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP-DB] SELECT * vs. SELECT field, field, field
A quick question, which executes faster ? Suppose i have a table with 6 fields and I need to use all of the info in the table, SELECT * FROM $table_name WHERE id = \"$id\" or SELECT field1, field2, field3, field4, field5, field6 FROM $table_name WHERE id = \"$id\" I understand that they do the same thing. Just wondered if there is a difference in execution speeds. I realize that its probably trivial, but I'm curious. thanks olinux