Re: [PHP] Big problem....need help
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Le Mercredi 9 Juillet 2003 15:13, phpu a écrit : I have a table like this: .. $sql = SELECT * FROM products, category WHERE category.name_category=products.name_category and category_id=.$_GET['category_id'] ; When i choose the category catg 1 the result is Name: aaa Name: aaa Name: ddd As you can see the name aaa appears 2 times insted 1. How to make the result look like this: Name: aaa Name: ddd Use GROUP BY $sql = SELECT * FROM products, category WHERE category.name_category=products.name_category and category_id=.$_GET['category_id'] GROUP BY products.mark_name; - -- ,, (° Nicolas Costes /|\ IUT de La Roche / Yon ( ^ ) Clé publique: http://www.keyserver.net/ ^ ^ http://www.gnu.org/philosophy/can-you-trust.fr.html -BEGIN PGP SIGNATURE- Version: GnuPG v1.2.1 (GNU/Linux) iD8DBQE/DB2GNc2aXy7LuOgRAmE6AKCIeGpWg78san/72M7vbhwJXQKXbQCfVxAJ OgayWbAh0cOXc5OCdVy2uWs= =vH6U -END PGP SIGNATURE- -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Big problem....need help
It isn't work. it gives me an error at this line. - Original Message - From: Nicolas Costes [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, July 09, 2003 4:49 PM Subject: Re: [PHP] Big problemneed help -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Le Mercredi 9 Juillet 2003 15:13, phpu a écrit : I have a table like this: .. $sql = SELECT * FROM products, category WHERE category.name_category=products.name_category and category_id=.$_GET['category_id'] ; When i choose the category catg 1 the result is Name: aaa Name: aaa Name: ddd As you can see the name aaa appears 2 times insted 1. How to make the result look like this: Name: aaa Name: ddd Use GROUP BY $sql = SELECT * FROM products, category WHERE category.name_category=products.name_category and category_id=.$_GET['category_id'] GROUP BY products.mark_name; - -- ,, (° Nicolas Costes /|\ IUT de La Roche / Yon ( ^ ) Clé publique: http://www.keyserver.net/ ^ ^ http://www.gnu.org/philosophy/can-you-trust.fr.html -BEGIN PGP SIGNATURE- Version: GnuPG v1.2.1 (GNU/Linux) iD8DBQE/DB2GNc2aXy7LuOgRAmE6AKCIeGpWg78san/72M7vbhwJXQKXbQCfVxAJ OgayWbAh0cOXc5OCdVy2uWs= =vH6U -END PGP SIGNATURE- -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Big problem....need help
try like this $sql = "SELECT * FROM products, category WHERE category.name_category=products.name_category and category_id=".$_GET['category_id']." GROUP BY products.mark_name"; ---Original Message--- From: phpu Date: Wednesday, July 09, 2003 09:51:08 PM To: [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Subject: Re: [PHP] Big problemneed help It isn't work. it gives me an error at this line. - Original Message - From: "Nicolas Costes" [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, July 09, 2003 4:49 PM Subject: Re: [PHP] Big problemneed help -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Le Mercredi 9 Juillet 2003 15:13, phpu a écrit : I have a table like this: .. $sql = "SELECT * FROM products, category WHERE category.name_category=products.name_category and category_id=".$_GET['category_id'] ; When i choose the category catg 1 the result is Name: aaa Name: aaa Name: ddd As you can see the name aaa appears 2 times insted 1. How to make the result look like this: Name: aaa Name: ddd Use "GROUP BY" $sql = "SELECT * FROM products, category WHERE category.name_category=products.name_category and category_id=".$_GET['category_id'] GROUP BY products.mark_name; - -- ,, (° Nicolas Costes /|\ IUT de La Roche / Yon ( ^ ) Clé publique: http://www.keyserver.net/ ^ ^ http://www.gnu.org/philosophy/can-you-trust.fr.html -BEGIN PGP SIGNATURE- Version: GnuPG v1.2.1 (GNU/Linux) iD8DBQE/DB2GNc2aXy7LuOgRAmE6AKCIeGpWg78san/72M7vbhwJXQKXbQCfVxAJ OgayWbAh0cOXc5OCdVy2uWs= =vH6U -END PGP SIGNATURE- -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php IncrediMail - Email has finally evolved - Click Here
Re: [PHP] Big problem....need help
10x a lot. it worked. Now I have another problem. How to find the number of the records in the table. this is the way i want (in this case} Name: aaa 2 times Name ddd 1 times Please help with this one - Original Message - From: Haseeb To: [EMAIL PROTECTED] ; [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Sent: Thursday, July 10, 2003 8:18 AM Subject: Re: [PHP] Big problemneed help try like this $sql = SELECT * FROM products, category WHERE category.name_category=products.name_category and category_id=.$_GET['category_id']. GROUP BY products.mark_name; ---Original Message--- From: phpu Date: Wednesday, July 09, 2003 09:51:08 PM To: [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Subject: Re: [PHP] Big problemneed help It isn't work. it gives me an error at this line. - Original Message - From: Nicolas Costes [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, July 09, 2003 4:49 PM Subject: Re: [PHP] Big problemneed help -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Le Mercredi 9 Juillet 2003 15:13, phpu a écrit : I have a table like this: .. $sql = SELECT * FROM products, category WHERE category.name_category=products.name_category and category_id=.$_GET['category_id'] ; When i choose the category catg 1 the result is Name: aaa Name: aaa Name: ddd As you can see the name aaa appears 2 times insted 1. How to make the result look like this: Name: aaa Name: ddd Use GROUP BY $sql = SELECT * FROM products, category WHERE category.name_category=products.name_category and category_id=.$_GET['category_id'] GROUP BY products.mark_name; - -- ,, (° Nicolas Costes /|\ IUT de La Roche / Yon ( ^ ) Clé publique: http://www.keyserver.net/ ^ ^ http://www.gnu.org/philosophy/can-you-trust.fr.html -BEGIN PGP SIGNATURE- Version: GnuPG v1.2.1 (GNU/Linux) iD8DBQE/DB2GNc2aXy7LuOgRAmE6AKCIeGpWg78san/72M7vbhwJXQKXbQCfVxAJ OgayWbAh0cOXc5OCdVy2uWs= =vH6U -END PGP SIGNATURE- -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php IncrediMail - Email has finally evolved - Click Here
Re: [PHP] Big problem....need help
First, you might want to use more descriptive subjects. That might describe your urgency, but it doesn't tell us what you need. As for the question, try this: $sql = SELECT *, count(products.mark_name) as count FROM products, category WHERE category.name_category=products.name_category AND category_id=.$_GET['category_id']. GROUP BY products.mark_name; but if you don't need all the other data in the rows, just do this: $sql = SELECT p.mark_name, count(p.mark_name) as count FROM products as p, category as c WHERE c.name_category=p.name_category AND category_id=.$_GET['category_id']. GROUP BY p.mark_name; --- phpu [EMAIL PROTECTED] wrote: 10x a lot. it worked. Now I have another problem. How to find the number of the records in the table. this is the way i want (in this case} Name: aaa 2 times Name ddd 1 times Please help with this one - Original Message - From: Haseeb To: [EMAIL PROTECTED] ; [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Sent: Thursday, July 10, 2003 8:18 AM Subject: Re: [PHP] Big problemneed help try like this $sql = SELECT * FROM products, category WHERE category.name_category=products.name_category and category_id=.$_GET['category_id']. GROUP BY products.mark_name; ---Original Message--- From: phpu Date: Wednesday, July 09, 2003 09:51:08 PM To: [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Subject: Re: [PHP] Big problemneed help It isn't work. it gives me an error at this line. - Original Message - From: Nicolas Costes [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, July 09, 2003 4:49 PM Subject: Re: [PHP] Big problemneed help -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Le Mercredi 9 Juillet 2003 15:13, phpu a écrit : I have a table like this: .. $sql = SELECT * FROM products, category WHERE category.name_category=products.name_category and category_id=.$_GET['category_id'] ; When i choose the category catg 1 the result is Name: aaa Name: aaa Name: ddd As you can see the name aaa appears 2 times insted 1. How to make the result look like this: Name: aaa Name: ddd Use GROUP BY $sql = SELECT * FROM products, category WHERE category.name_category=products.name_category and category_id=.$_GET['category_id'] GROUP BY products.mark_name; - -- ,, (° Nicolas Costes /|\ IUT de La Roche / Yon ( ^ ) Clé publique: http://www.keyserver.net/ ^ ^ http://www.gnu.org/philosophy/can-you-trust.fr.html -BEGIN PGP SIGNATURE- Version: GnuPG v1.2.1 (GNU/Linux) iD8DBQE/DB2GNc2aXy7LuOgRAmE6AKCIeGpWg78san/72M7vbhwJXQKXbQCfVxAJ OgayWbAh0cOXc5OCdVy2uWs= =vH6U -END PGP SIGNATURE- -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php IncrediMail - Email has finally evolved - Click Here = Mark Weinstock [EMAIL PROTECTED] *** You can't demand something as a right unless you are willing to fight to death to defend everyone else's right to the same thing. *** __ Do you Yahoo!? SBC Yahoo! DSL - Now only $29.95 per month! http://sbc.yahoo.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] BIG PROBLEm with headers
Hi Krzysiek: I have problem with downloading any file from my site using IE 5.5 and HTTPS protocol. My php script works fine with Netscape 6.2 and HTTP/HTTPS protocols and with IE 5.5 but only with HTTP protocol. I suspect your script has nothing to do with it. A while back, I had problems serving my SSL'd pages to IE 5 users. If I recall correctly, it turned out to be a bug in IE not being able to process certificiates with key lengths that were not the ones expected. Thawte or my ISP inadvertently used a 1028 bit key on the certificate rather than 1024. Got a new certificate and everything's worked fine since then. --Dan -- PHP scripts that make your job easier http://www.analysisandsolutions.com/code/ SQL Solution | Layout Solution | Form Solution T H E A N A L Y S I S A N D S O L U T I O N S C O M P A N Y -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] BIG PROBLEm with headers
On Friday, March 8, 2002, at 01:06 PM, Analysis Solutions wrote: I have problem with downloading any file from my site using IE 5.5 and HTTPS protocol. My php script works fine with Netscape 6.2 and HTTP/HTTPS protocols and with IE 5.5 but only with HTTP protocol. I suspect your script has nothing to do with it. A while back, I had problems serving my SSL'd pages to IE 5 users. If I recall correctly, it turned out to be a bug in IE not being able to process certificiates with key lengths that were not the ones expected. Thawte or my ISP inadvertently used a 1028 bit key on the certificate rather than 1024. IE5 has known problems with SSL. Some sites (sourceforge.net) use SSL only to authenticate the user, letting them back out of secure-mode after authentication succeeds, if the useragent is IE5. It reduces the potential for problems. Erik Erik Price Web Developer Temp Media Lab, H.H. Brown [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] BIG problem...
You need to install the flex libraries from www.gnu.org: you locate it : http://www.gnu.org/software/flex/flex.html Nael Mohammad Neomar, Inc. [EMAIL PROTECTED] 415-403-7300 x314 (Work) 415-793-0609 (Mobile) When Wireless Means Business CONFIDENTIALITY NOTICE: This e-mail may contain confidential information that is legally privileged. Do not read this e-mail if you are not the intended recipient. This e-mail transmission, and any documents, files or previous e-mail messages attached to it may contain confidential information that is legally privileged. If you are not the intended recipient, or a person responsible for delivering it to the intended recipient, you are hereby notified that any disclosure, copying, distribution or use of any of the information contained in or attached to this transmission is STRICTLY PROHIBITED. If you have received this transmission in error, please immediately notify us by reply e-mail or by telephone at (415) 403-7300, and destroy the original transmission and its attachments without reading or saving in any manner. Thank you. -Original Message- From: Joaquin [mailto:[EMAIL PROTECTED]] Sent: Friday, September 14, 2001 4:38 PM To: [EMAIL PROTECTED] Subject: [PHP] BIG problem... Hello.. i speak spanish so.. i prefear the answer to this question will in spanixh: I have a problem... i do all correctily but.. iy happens.. a lot of times.. : bash-2.04# cd apache_1.3.19 bash-2.04# ./configure --prefix=/www Configuring for Apache, Version 1.3.19 + using installation path layout: Apache (config.layout) Creating Makefile Creating Configuration.apaci in src Creating Makefile in src + configured for Linux platform + setting C compiler to gcc + setting C pre-processor to gcc -E + checking for system header files + adding selected modules + checking sizeof various data types + doing sanity check on compiler and options Creating Makefile in src/support Creating Makefile in src/regex Creating Makefile in src/os/unix Creating Makefile in src/ap Creating Makefile in src/main Creating Makefile in src/lib/expat-lite Creating Makefile in src/modules/standardb bash-2.04# cd php-4.0.6 bash-2.04# ./configure --with-mysql --with-apache=../apache_1.3.x --enable-track-vars loading cache ./config.cache checking for a BSD compatible install... /usr/bin/install -c checking whether build environment is sane... yes checking whether make sets ${MAKE}... yes checking for working aclocal... missing checking for working autoconf... missing checking for working automake... missing checking for working autoheader... missing checking for working makeinfo... found checking whether to enable maintainer-specific portions of Makefiles... no checking host system type... i686-pc-linux-gnu checking for gawk... gawk checking for bison... no checking for byacc... no configure: warning: You will need bison if you want to regenerate the PHP parsers. checking for gcc... gcc checking whether the C compiler (gcc ) works... yes checking whether the C compiler (gcc ) is a cross-compiler... no checking whether we are using GNU C... yes checking whether gcc accepts -g... yes checking how to run the C preprocessor... gcc -E checking for AIX... no checking for gcc option to accept ANSI C... none needed checking for ranlib... ranlib checking whether gcc and cc understand -c and -o together... yes checking whether ln -s works... yes checking for flex... lex checking for yywrap in -ll... no checking lex output file root... ./configure: lex: command not found configure: error: cannot find output from lex; giving up bash-2.04# well .. this is my problem.. i dont now ... if you can get me same help.. thank you -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] Big Problem
in php.ini, put /var/qmail/bin/qmail-inject into sendmail_path -Original Message- From: Thomas Booms [mailto:[EMAIL PROTECTED]] Sent: Wednesday, April 25, 2001 6:48 PM To: [EMAIL PROTECTED] Subject: [PHP] Big Problem Hi all, I'm using on my new machine (SuSE 7.0) PHP4. In one PHP4-Script I use the mail-Function. But my /var/log/mail (qmail) does not give any entry for this mail. Is there a bug? In PHP3 it was all running good. I have a serious problem here because this is a customers site! Thanks in advance. Thomas -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Big Problem
On Thu, 26 Apr 2001 01:48:13 +0200, Thomas Booms ([EMAIL PROTECTED]) wrote: Hi all, I'm using on my new machine (SuSE 7.0) PHP4. In one PHP4-Script I use the mail-Function. But my /var/log/mail (qmail) does not give any entry for this mail. Is there a bug? In PHP3 it was all running good. I have a serious problem here because this is a customers site! Thanks in advance. Thomas maybe sendmail_path should be set, or else I think you can just check that sendmail is in the path. I know that you're using qmail, but it usually puts a wrapper called sendmail in the path which calls qmail. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] big problem
You need to set the permissions in that folder so that you can write. PHP acts like IUSR(computernmae), so set IUSR(computername) permission to write. This is Windows, by the way... // Tobias ""Salim Meethoo"" [EMAIL PROTECTED] wrote in message 99c90k$83u$[EMAIL PROTECTED]">news:99c90k$83u$[EMAIL PROTECTED]... hello there, can somebody help me out with my scripts while running this: ? .. $myfile = fopen("data.txt","w"); .etc; ? i get the following error message: Warning: fopen("compteur","w") - Permission denied in cmguestcount.inc.php3 on line 11 i'm using php3 and this scripts are for a counter of my page . thanks Salim -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] BIG PROBLEM WITH SEARCH!!!!!!
best way is this. if ($CID) $query[] = "CID = '$CID'"; if ($CUserName) $query[] = "CUserName = '$CUserName'"; if ($CAge) $query[] = "CAge = '$CAge'"; if ($CEducation) $query[] = "CEducation = '$CEducation'"; if (isset($query)) $query = "SELECT * FROM clients WHERE CID = '$CID' AND CUserName = '$CUserName' " . implode(' AND ', $query); else $query = "SELECT * FROM clients WHERE CID = '$CID' AND CUserName = '$CUserName' "; but this works too... $query = "SELECT * FROM clients WHERE CID = '$CID' AND CUserName = '$CUserName' "; if ($CAge) $query .= " AND CAge = '$CAge'"; if ($CEducation) $query .= " AND CEducation = '$CEducation'"; the latter only works if there is at LEAST one variable to be used. Is this what you meant? no? email me k. Chris Lee Mediawaveonline.com Mike Yuen [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... I'm developing a site that requires people to sign up. During this time, we get their name, email, city, etc. There is also optional informational like (age, education) that they don't have to fill in. Now, the problem we have is we allow people search through the database using mostly the same criteria people filled in during their sign up. However, if someone does not have a preference in Education or age, how do we create a query that selects all the records. Currently, the SQL statement has several "OR" clauses in between the optional fields (ie: select * form clients where (CID='$CID' AND CUserName='$CUserName') OR CAge='$CAge' OR CEducation='$CEducation'). You can see from the query that if someone has no preference, it will take the value from the form and search just on that value - NOT everything. I'm stumped on how to solve this problem. Can anyone help me out? Thanks, Mike -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]