Re: [PHP-DB] Re: maximum number of records in a db?
And I agree. I haven't asked many questions myself but have seen the responses from some people. I think you have to think that they have looked and this IS their last resort. I've found when doing searches on the web that I get presented with 5000 pages of un relevant stuff. Remember when you couldn't use a mouse??? Han. - Original Message - From: "Darryl Steyn" <[EMAIL PROTECTED]> To: Sent: Friday, August 26, 2005 5:07 PM Subject: Re: [PHP-DB] Re: maximum number of records in a db? with questions being answered like that, i am sure many will. On 8/26/05, Raz <[EMAIL PROTECTED]> wrote: Jordan > I am sorry that people like to ridicule noobs on this list. It was a > simple question with a simple answer. Thank you!! Not at all, shame if you see it this way - it is mostly a case of people on this list helping you to help yourself - respect to those who've had a go at finding the info themselves first. I've hardly ever asked a question here, because I have found the answer elsewhere first - treat this list as more of a last resort... raz -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DB] mysql_connect($server,$user,$password);
Much of the password discussion I've seen revolves around encrypting the user-supplied password, but what about the user/password used to make the initial connection? In other words, I'm assuming that the .php file has the initial user and password right in the text in order to make the connection. Is there a way around this, because it seems very insecure to me that these parameters would be in the .php source. Or is the .php source supposedly not readable? thanks, Chuck -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DB] Page refresh question
Hi, I can think of 2 solutions: 1 is an old one I used ages ago, and it was to use javascript to put their choices (onclick, field.value=£3 type of thing) and when they click the OK button it gets sent to php script that sends it to mysql, etc. 2 is pretty much the same but using cookies with javascript. Example : -- <!-- Hide from old browsers //Hide from Java Script function cookieVal(cookieName) { thisCookie = document.cookie.split("; "); for (i=0; i<thisCookie.length; i++) { if (cookieName == thisCookie[i].split("=")[0]) { return thisCookie[i].split("=")[1]; } } return 0; } //--> <!-- Hide from old browsers //Hide from Java Script function SetCookie(value1,value2,value3){ var greetName = cookieVal("mysession"); if(greetName == 0){ document.cookie = "mysession" + "=" + value1 + ":" + value2 + ":" + value3 +":1%" + "; path=/; expires=19 January 2038 03:14:07"; var addme= value +":1%"; } else{ document.cookie = "mysession" + "=" + greetName + value1 + ":" + value2 + ":" + value3 + ":1%" + "; path=/; expires=19 January 2038 03:14:07"; var addme = value +":1%"; } theURL="<a rel="nofollow" href="http://www.domain.com/cgi-bin/showbasket.cgi?cookievalue="+addme">http://www.domain.com/cgi-bin/showbasket.cgi?cookievalue="+addme</a>; winName="order3"; features="scrollbars=yes,width=400,height=600"; child = window.open(theURL,winName,features); child.focus(); } //--> ">Hope this helps. Han. - Original Message - From: "Chris Payne" <[EMAIL PROTECTED]> To: Sent: Thursday, June 09, 2005 5:33 AM Subject: [PHP-DB] Page refresh question > Hi there everyone, > > > > I'm using PHP and MySQL in a shopping cart system but the client wants it > so > that when you add an item to the cart the page doesn't refresh and we all > know with PHP the page MUST refresh in order to execute the MySQL query. > Is > it possible, maybe with javascript? That I can talk to MySQL without > having > to have the page itself refresh when they add the items to the cart? This > is really a pain as the system was basically finished and now I'm told > they > don't want the page to refresh and they see other sites that don't > refresh - > sigh. If it can be done with Javascript, do you have a sample of how I > can > use PHP, Javascript and MySQL together to achieve this please? > > > > Any help would not only be appreciated, but would save my life. > > > > Thank you. > > > > Chris > > -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php ** IMPORTANT NOTICE This communication is for the exclusive use of the intended recipient(s) named above. If you receive this communication in error, you should notify the sender by e-mail or by telephone (+44) 191 224 4461, delete it and destroy any copies of it. This communication may contain confidential information and material protected by copyright, design right or other intellectual property rights which are and shall remain the property of Piranha Studios Limited. Any form of distribution, copying or other unauthorised use of this communication or the information in it is strictly prohibited. Piranha Studios Limited asserts its rights in this communication and the information in it and reserves the right to take action against anyone who misuses it or the information in it. Piranha Studios Limited cannot accept any liability sustained as a result of software viruses and would recommend that you carry out your own virus checks before opening any attachment. <<<>>>AdmID:2C0189DC9073A0C27125545E07598202 ** IMPORTANT NOTICE This communication is for the exclusive use of the intended recipient(s) named above. If you receive this communication in error, you should notify the sender by e-mail or by telephone (+44) 191 224 4461, delete it and destroy any copies of it. This communication may contain confidential information and material protected by copyright, design right or other intellectual property rights which are and shall remain the property of Piranha Studios Limited. Any form of distribution, copying or other unauthorised use of this communication or the information in it is strictly prohibited. Piranha Studios Limited asserts its rights in this communication and t
Re: [PHP-DB] Page refresh question
Hi, I can think of 2 solutions: 1 is an old one I used ages ago, and it was to use javascript to put their choices (onclick, field.value=£3 type of thing) and when they click the OK button it gets sent to php script that sends it to mysql, etc. 2 is pretty much the same but using cookies with javascript. Example : -- <!-- Hide from old browsers //Hide from Java Script function cookieVal(cookieName) { thisCookie = document.cookie.split("; "); for (i=0; i<thisCookie.length; i++) { if (cookieName == thisCookie[i].split("=")[0]) { return thisCookie[i].split("=")[1]; } } return 0; } //--> <!-- Hide from old browsers //Hide from Java Script function SetCookie(value1,value2,value3){ var greetName = cookieVal("mysession"); if(greetName == 0){ document.cookie = "mysession" + "=" + value1 + ":" + value2 + ":" + value3 +":1%" + "; path=/; expires=19 January 2038 03:14:07"; var addme= value +":1%"; } else{ document.cookie = "mysession" + "=" + greetName + value1 + ":" + value2 + ":" + value3 + ":1%" + "; path=/; expires=19 January 2038 03:14:07"; var addme = value +":1%"; } theURL="<a rel="nofollow" href="http://www.domain.com/cgi-bin/showbasket.cgi?cookievalue="+addme">http://www.domain.com/cgi-bin/showbasket.cgi?cookievalue="+addme</a>; winName="order3"; features="scrollbars=yes,width=400,height=600"; child = window.open(theURL,winName,features); child.focus(); } //--> ">Hope this helps. Han. - Original Message - From: "Chris Payne" <[EMAIL PROTECTED]> To: Sent: Thursday, June 09, 2005 5:33 AM Subject: [PHP-DB] Page refresh question > Hi there everyone, > > > > I'm using PHP and MySQL in a shopping cart system but the client wants it > so > that when you add an item to the cart the page doesn't refresh and we all > know with PHP the page MUST refresh in order to execute the MySQL query. > Is > it possible, maybe with javascript? That I can talk to MySQL without > having > to have the page itself refresh when they add the items to the cart? This > is really a pain as the system was basically finished and now I'm told > they > don't want the page to refresh and they see other sites that don't > refresh - > sigh. If it can be done with Javascript, do you have a sample of how I > can > use PHP, Javascript and MySQL together to achieve this please? > > > > Any help would not only be appreciated, but would save my life. > > > > Thank you. > > > > Chris > > -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php ** IMPORTANT NOTICE This communication is for the exclusive use of the intended recipient(s) named above. If you receive this communication in error, you should notify the sender by e-mail or by telephone (+44) 191 224 4461, delete it and destroy any copies of it. This communication may contain confidential information and material protected by copyright, design right or other intellectual property rights which are and shall remain the property of Piranha Studios Limited. Any form of distribution, copying or other unauthorised use of this communication or the information in it is strictly prohibited. Piranha Studios Limited asserts its rights in this communication and the information in it and reserves the right to take action against anyone who misuses it or the information in it. Piranha Studios Limited cannot accept any liability sustained as a result of software viruses and would recommend that you carry out your own virus checks before opening any attachment. <<<>>>AdmID:2C0189DC9073A0C27125545E07598202 ** IMPORTANT NOTICE This communication is for the exclusive use of the intended recipient(s) named above. If you receive this communication in error, you should notify the sender by e-mail or by telephone (+44) 191 224 4461, delete it and destroy any copies of it. This communication may contain confidential information and material protected by copyright, design right or other intellectual property rights which are and shall remain the property of Piranha Studios Limited. Any form of distribution, copying or other unauthorised use of this communication or the information in it is strictly prohibited. Piranha Studios Limited asserts its rights in this communication and t
Re: [PHP-DB] Page refresh question
Hi, I can think of 2 solutions: 1 is an old one I used ages ago, and it was to use javascript to put their choices (onclick, field.value=£3 type of thing) and when they click the OK button it gets sent to php script that sends it to mysql, etc. 2 is pretty much the same but using cookies with javascript. Example : -- <!-- Hide from old browsers //Hide from Java Script function cookieVal(cookieName) { thisCookie = document.cookie.split("; "); for (i=0; i<thisCookie.length; i++) { if (cookieName == thisCookie[i].split("=")[0]) { return thisCookie[i].split("=")[1]; } } return 0; } //--> <!-- Hide from old browsers //Hide from Java Script function SetCookie(value1,value2,value3){ var greetName = cookieVal("mysession"); if(greetName == 0){ document.cookie = "mysession" + "=" + value1 + ":" + value2 + ":" + value3 +":1%" + "; path=/; expires=19 January 2038 03:14:07"; var addme= value +":1%"; } else{ document.cookie = "mysession" + "=" + greetName + value1 + ":" + value2 + ":" + value3 + ":1%" + "; path=/; expires=19 January 2038 03:14:07"; var addme = value +":1%"; } theURL="<a rel="nofollow" href="http://www.domain.com/cgi-bin/showbasket.cgi?cookievalue="+addme">http://www.domain.com/cgi-bin/showbasket.cgi?cookievalue="+addme</a>; winName="order3"; features="scrollbars=yes,width=400,height=600"; child = window.open(theURL,winName,features); child.focus(); } //--> ">Hope this helps. Han. - Original Message - From: "Chris Payne" <[EMAIL PROTECTED]> To: Sent: Thursday, June 09, 2005 5:33 AM Subject: [PHP-DB] Page refresh question > Hi there everyone, > > > > I'm using PHP and MySQL in a shopping cart system but the client wants it > so > that when you add an item to the cart the page doesn't refresh and we all > know with PHP the page MUST refresh in order to execute the MySQL query. > Is > it possible, maybe with javascript? That I can talk to MySQL without > having > to have the page itself refresh when they add the items to the cart? This > is really a pain as the system was basically finished and now I'm told > they > don't want the page to refresh and they see other sites that don't > refresh - > sigh. If it can be done with Javascript, do you have a sample of how I > can > use PHP, Javascript and MySQL together to achieve this please? > > > > Any help would not only be appreciated, but would save my life. > > > > Thank you. > > > > Chris > > -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php ** IMPORTANT NOTICE This communication is for the exclusive use of the intended recipient(s) named above. If you receive this communication in error, you should notify the sender by e-mail or by telephone (+44) 191 224 4461, delete it and destroy any copies of it. This communication may contain confidential information and material protected by copyright, design right or other intellectual property rights which are and shall remain the property of Piranha Studios Limited. Any form of distribution, copying or other unauthorised use of this communication or the information in it is strictly prohibited. Piranha Studios Limited asserts its rights in this communication and the information in it and reserves the right to take action against anyone who misuses it or the information in it. Piranha Studios Limited cannot accept any liability sustained as a result of software viruses and would recommend that you carry out your own virus checks before opening any attachment. <<<>>>AdmID:2C0189DC9073A0C27125545E07598202 ** IMPORTANT NOTICE This communication is for the exclusive use of the intended recipient(s) named above. If you receive this communication in error, you should notify the sender by e-mail or by telephone (+44) 191 224 4461, delete it and destroy any copies of it. This communication may contain confidential information and material protected by copyright, design right or other intellectual property rights which are and shall remain the property of Piranha Studios Limited. Any form of distribution, copying or other unauthorised use of this communication or the information in it is strictly prohibited. Piranha Studios Limited asserts its rights in this communication and the information in i
Re: [PHP-DB] Page refresh question
Hi, I can think of 2 solutions: 1 is an old one I used ages ago, and it was to use javascript to put their choices (onclick, field.value=£3 type of thing) and when they click the OK button it gets sent to php script that sends it to mysql, etc. 2 is pretty much the same but using cookies with javascript. Example : -- <!-- Hide from old browsers //Hide from Java Script function cookieVal(cookieName) { thisCookie = document.cookie.split("; "); for (i=0; i<thisCookie.length; i++) { if (cookieName == thisCookie[i].split("=")[0]) { return thisCookie[i].split("=")[1]; } } return 0; } //--> <!-- Hide from old browsers //Hide from Java Script function SetCookie(value1,value2,value3){ var greetName = cookieVal("mysession"); if(greetName == 0){ document.cookie = "mysession" + "=" + value1 + ":" + value2 + ":" + value3 +":1%" + "; path=/; expires=19 January 2038 03:14:07"; var addme= value +":1%"; } else{ document.cookie = "mysession" + "=" + greetName + value1 + ":" + value2 + ":" + value3 + ":1%" + "; path=/; expires=19 January 2038 03:14:07"; var addme = value +":1%"; } theURL="<a rel="nofollow" href="http://www.domain.com/cgi-bin/showbasket.cgi?cookievalue="+addme">http://www.domain.com/cgi-bin/showbasket.cgi?cookievalue="+addme</a>; winName="order3"; features="scrollbars=yes,width=400,height=600"; child = window.open(theURL,winName,features); child.focus(); } //--> ">Hope this helps. Han. - Original Message - From: "Chris Payne" <[EMAIL PROTECTED]> To: Sent: Thursday, June 09, 2005 5:33 AM Subject: [PHP-DB] Page refresh question > Hi there everyone, > > > > I'm using PHP and MySQL in a shopping cart system but the client wants it > so > that when you add an item to the cart the page doesn't refresh and we all > know with PHP the page MUST refresh in order to execute the MySQL query. > Is > it possible, maybe with javascript? That I can talk to MySQL without > having > to have the page itself refresh when they add the items to the cart? This > is really a pain as the system was basically finished and now I'm told > they > don't want the page to refresh and they see other sites that don't > refresh - > sigh. If it can be done with Javascript, do you have a sample of how I > can > use PHP, Javascript and MySQL together to achieve this please? > > > > Any help would not only be appreciated, but would save my life. > > > > Thank you. > > > > Chris > > -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php ** IMPORTANT NOTICE This communication is for the exclusive use of the intended recipient(s) named above. If you receive this communication in error, you should notify the sender by e-mail or by telephone (+44) 191 224 4461, delete it and destroy any copies of it. This communication may contain confidential information and material protected by copyright, design right or other intellectual property rights which are and shall remain the property of Piranha Studios Limited. Any form of distribution, copying or other unauthorised use of this communication or the information in it is strictly prohibited. Piranha Studios Limited asserts its rights in this communication and the information in it and reserves the right to take action against anyone who misuses it or the information in it. Piranha Studios Limited cannot accept any liability sustained as a result of software viruses and would recommend that you carry out your own virus checks before opening any attachment. <<<>>>AdmID:2C0189DC9073A0C27125545E07598202 ** IMPORTANT NOTICE This communication is for the exclusive use of the intended recipient(s) named above. If you receive this communication in error, you should notify the sender by e-mail or by telephone (+44) 191 224 4461, delete it and destroy any copies of it. This communication may contain confidential information and material protected by copyright, design right or other intellectual property rights which are and shall remain the property of Piranha Studios Limited. Any form of distribution, copying or other unauthorised use of this communication or the information in it is strictly prohibited. Piranha Studios Limited asserts its rights in this communication and the information in it
Re: [PHP-DB] Page refresh question
Hi, I can think of 2 solutions: 1 is an old one I used ages ago, and it was to use javascript to put their choices (onclick, field.value=£3 type of thing) and when they click the OK button it gets sent to php script that sends it to mysql, etc. 2 is pretty much the same but using cookies with javascript. Example : -- <!-- Hide from old browsers //Hide from Java Script function cookieVal(cookieName) { thisCookie = document.cookie.split("; "); for (i=0; i<thisCookie.length; i++) { if (cookieName == thisCookie[i].split("=")[0]) { return thisCookie[i].split("=")[1]; } } return 0; } //--> <!-- Hide from old browsers //Hide from Java Script function SetCookie(value1,value2,value3){ var greetName = cookieVal("mysession"); if(greetName == 0){ </pre><tt>document.cookie = "mysession" + "=" + value1 + ":" + value2 + ":" + value3 </tt><tt>+":1%" + "; path=/; expires=19 January 2038 03:14:07"; </tt><pre style="margin: 0em;"> var addme= value +":1%"; } else{ </pre><tt>document.cookie = "mysession" + "=" + greetName + value1 + ":" + value2 + </tt><tt>":" + value3 + ":1%" + "; path=/; expires=19 January 2038 03:14:07"; </tt><pre style="margin: 0em;"> var addme = value +":1%"; } theURL="<a rel="nofollow" href="http://www.domain.com/cgi-bin/showbasket.cgi?cookievalue="+addme">http://www.domain.com/cgi-bin/showbasket.cgi?cookievalue="+addme</a>; winName="order3"; features="scrollbars=yes,width=400,height=600"; child = window.open(theURL,winName,features); child.focus(); } //--> vspace="3" border="0" onClick="javascript:SetCookie('555435,£3,image1');">">Hope this helps. Han. - Original Message - From: "Chris Payne" <[EMAIL PROTECTED]> To: Sent: Thursday, June 09, 2005 5:33 AM Subject: [PHP-DB] Page refresh question Hi there everyone, I'm using PHP and MySQL in a shopping cart system but the client wants it so that when you add an item to the cart the page doesn't refresh and we all know with PHP the page MUST refresh in order to execute the MySQL query. Is it possible, maybe with javascript? That I can talk to MySQL without having to have the page itself refresh when they add the items to the cart? This is really a pain as the system was basically finished and now I'm told they don't want the page to refresh and they see other sites that don't refresh - sigh. If it can be done with Javascript, do you have a sample of how I can use PHP, Javascript and MySQL together to achieve this please? Any help would not only be appreciated, but would save my life. Thank you. Chris -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DB] phpdocumentor
I'm having to use phpdocumentor and am worried it's gonna conflict with my mysql commands and confuse the thing, so I'll have to check and recheck every line after I've done my initial check and rechecks of my code. Has anyone found it causes conflict or is there really no problem? Han. -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DB] phpdocumentor
I'm having to use phpdocumentor and am worried it's gonna conflict with my mysql commands and confuse the thing, so I'll have to check and recheck every line after I've done my initial check and rechecks of my code. Has anyone found it causes conflict or is there really no problem? Han. -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DB] foreach()
Try this : -- $z = array('foo' => array('bar')), 'dis' => array('dat')); while (list($key, $val) = each($z)) { echo "$key $val"; } - Original Message - From: "Yemi Obembe" <[EMAIL PROTECTED]> To: Sent: Monday, January 31, 2005 9:47 AM Subject: [PHP-DB] foreach() Hi folks. wat can be done to dis: $z = array('foo' => array('bar')), 'dis' => array('dat')); foreach(//???) { echo "//??? //?? "; } to output dis: foo bar dis dat - A passion till tomorrow, Opeyemi Obembe | ng.clawz.com - Do you Yahoo!? The all-new My Yahoo! - What will yours do? -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DB] LEFT joins
Hmm, still no luck. Thanks for the help. I think I'll have to break the select up into 2 selects and throw the results of the first into arrays. Didn't want to do it like that, but it's gonna be quicker now. Han. - Original Message - From: "Jochem Maas" <[EMAIL PROTECTED]> To: "Han" <[EMAIL PROTECTED]> Cc: Sent: Wednesday, January 12, 2005 4:06 PM Subject: Re: [PHP-DB] LEFT joins Han wrote: Oh yes, sorry, not used to the "reply-all". most of us get hammered by that one once in a while! read on the the interesting bit... I've pasted it directly into the MYSQL console as just sql and this is where I discovered my problem. My code is : -- SELECT b.fldName, b.fldEmail, b.fldCountryCode, b.fldMobile, a.fldTime as Time, c.fldUsername FROM tblSubscribersChoices a INNER JOIN tblUser c on a.fldChoice=c.fldClientID LEFT JOIN tblSubscribers b on a.fldClientID = b.fldID ORDER BY `c`.`fldUsername` ASC Now this works fine. But, I'm trying to tally the country code with it's actual name (which is held in tc_countries). So I thought if I add another LEFT JOIN at the end of the query : -- SELECT b.fldName, b.fldEmail, b.fldCountryCode, d.fldCode as FCode, b.fldMobile, a.fldTime as Time, c.fldUsername FROM tblSubscribersChoices a INNER JOIN tblUser c on a.fldChoice=c.fldClientID LEFT JOIN tblSubscribers b on a.fldClientID = b.fldID LEFT JOIN tc_countries d on lets look just at this last little bit of the statement: b.fldCountryCode = d.fldCode ORDER BY `c`.`fldUsername` ASC try changing this to: d.fldCode = b.fldCountryCode ORDER BY c.fldUsername ASC (I removed the backticks too, as you don't use them in the rest of your query, and that was irritating the aethetic monster within me ;-) Actually looking at your complete statement you _seem_ to have got all the JOINS backwards (I'm no SQL guru so I may be totally wrong here, besides which I don't know the DB-schema your using), does this work: SELECT b.fldName, b.fldEmail, b.fldCountryCode, d.fldCode as FCode, b.fldMobile, a.fldTime as Time, c.fldUsername FROM tblSubscribersChoices a LEFT JOIN tblUser c ON c.fldClientID = a.fldChoice LEFT JOIN tblSubscribers b ON b.fldID = a.fldClientID LEFT JOIN tc_countries d ON d.fldCode = b.fldCountryCode ORDER BY c.fldUsername ASC and if that works but doesn't give you repeat records try adding the DISTINCT keyword after SELECT. -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DB] LEFT joins
Oh yes, sorry, not used to the "reply-all". I've pasted it directly into the MYSQL console as just sql and this is where I discovered my problem. My code is : -- SELECT b.fldName, b.fldEmail, b.fldCountryCode, b.fldMobile, a.fldTime as Time, c.fldUsername FROM tblSubscribersChoices a INNER JOIN tblUser c on a.fldChoice=c.fldClientID LEFT JOIN tblSubscribers b on a.fldClientID = b.fldID ORDER BY `c`.`fldUsername` ASC Now this works fine. But, I'm trying to tally the country code with it's actual name (which is held in tc_countries). So I thought if I add another LEFT JOIN at the end of the query : -- SELECT b.fldName, b.fldEmail, b.fldCountryCode, d.fldCode as FCode, b.fldMobile, a.fldTime as Time, c.fldUsername FROM tblSubscribersChoices a INNER JOIN tblUser c on a.fldChoice=c.fldClientID LEFT JOIN tblSubscribers b on a.fldClientID = b.fldID LEFT JOIN tc_countries d on b.fldCountryCode = d.fldCode ORDER BY `c`.`fldUsername` ASC But this just times out as it's matching too many matches. I should give me the same results as before, but with the country name added as well next to the b.fldCountryCode - Original Message - From: "Jochem Maas" <[EMAIL PROTECTED]> To: "Han" <[EMAIL PROTECTED]>; Sent: Wednesday, January 12, 2005 1:51 PM Subject: Re: [PHP-DB] LEFT joins BTW: Hans please use 'reply to all' so that the rest of the list can see your replies (+ it makes me feel less like you personal help-desk ;-). ...on to the reply proper: Han wrote: Hi, thanx for replying. It still times out when I use either of those alternatives. can you tell what exactly the script is timing out on - i.e. are you sure its the call to the DB? you SQL _may_ not be the most efficient way of doing it (not that I know or anything) but I can tell you that I have a query on a production site which involves 16 JOINS and that works fine [I can here you laughing in the bach there ;-)] - actually it had 33 JOINS but there is a hard limit to the number of joins per statement in the version of MySQL the site uses so I had to split the query into 2! also have you tried running the complete query/queries directly in a MySQL console? i.e. remove PHP from the equation to determine if the problem is actually the SQL. please tell us whether the statements work ok when you run them directly. I've tried changing all the JOINs around and nothing works. Post the table deinfitions to the list + a recap on what you are trying to get as a result. I thought maybe there's a logic problem going on? some kind of problem anyway ;-) SELECT b.fldName, b.fldEmail, b.fldCountryCode, d.fldCode as FCode, b.fldMobile, a.fldTime as Time, c.fldUsername FROM tblSubscribersChoices a INNER JOIN tblUser c on a.fldChoice=c.fldClientID LEFT JOIN tblSubscribers b on a.fldClientID = b.fldID LEFT JOIN tc_countries d on b.fldCountryCode = d.fldCode ORDER BY `c`.`fldUsername` ASC in the orderby clause you apply backticks to the table alias 'c', which you don't do anywhere else. its a long shot but try removing those backticks. -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DB] LEFT joins
Hi, I'm having a problem with some joins. My code is : -- SELECT b.fldName, b.fldEmail, b.fldCountryCode, b.fldMobile, a.fldTime as Time, c.fldUsername FROM tblSubscribersChoices a INNER JOIN tblUser c on a.fldChoice=c.fldClientID LEFT JOIN tblSubscribers b on a.fldClientID = b.fldID ORDER BY `c`.`fldUsername` ASC Now this works fine. But, I'm trying to tally the country code with it's actual name (which is held in tc_countries). So I thought if I add another LEFT JOIN at the end of the query : -- SELECT b.fldName, b.fldEmail, b.fldCountryCode, d.fldCode as FCode, b.fldMobile, a.fldTime as Time, c.fldUsername FROM tblSubscribersChoices a INNER JOIN tblUser c on a.fldChoice=c.fldClientID LEFT JOIN tblSubscribers b on a.fldClientID = b.fldID LEFT JOIN tc_countries d on b.fldCountryCode = d.fldCode ORDER BY `c`.`fldUsername` ASC But this just times out as it's matching too many matches. What am I doing wrong??? Han.
Re: [PHP-DB] password encryption
Thanks to evryone for their help. Haven't done it yet as I'm working on someone else's server and they won't do certain things. I've got all the info I was lacking now, so I'm sure I can work something out. Han. - Original Message - From: "php_user" <[EMAIL PROTECTED]> To: "Han" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> Sent: Friday, November 19, 2004 12:21 PM Subject: Re: [PHP-DB] password encryption Han, You can try installing mcrypt, it gives you encryption/decryption capabilities in PHP. It's fairly easy to install in you're running a Windows system; I think you have to recompile php if your on a Linux system, and I have never been able to successfully do that. You might look into it though, I don't quite understand why it can't be included with the default PHP installation, or be made easier to install. http://us2.php.net/mcrypt -JD Han wrote: Hello, I'm having a real problem and wondering if anyone can help. I need to set up htaccess ans htpasswd files to authenticate users on my system. I need to do it with PHP, but can't find a way of encrypting the password so it works. I've used an online encrypter for testing the system, and I've got the .htaccess and .htpasswd files correct, but I need to programmatically encrypt the password in my script then write it to the 2 files. Han. -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DB] password encryption
Hello, I'm having a real problem and wondering if anyone can help. I need to set up htaccess ans htpasswd files to authenticate users on my system. I need to do it with PHP, but can't find a way of encrypting the password so it works. I've used an online encrypter for testing the system, and I've got the .htaccess and .htpasswd files correct, but I need to programmatically encrypt the password in my script then write it to the 2 files. Han. -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DB] Arabic characters displayed as garbage !!
Sorry, I meant BLOB, not BLOP. Han. - Original Message - From: "Han" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]>; "Dre" <[EMAIL PROTECTED]> Cc: <[EMAIL PROTECTED]> Sent: Monday, October 04, 2004 3:24 PM Subject: Re: [PHP-DB] Arabic characters displayed as garbage !! Hi, I might be able to help. I've done a website that uses Chinese characters. I have to store the data in a BLOP mysql field. Then use the correct ISO for the webpage display. Try that. Han - Original Message - From: <[EMAIL PROTECTED]> To: "Dre" <[EMAIL PROTECTED]> Cc: <[EMAIL PROTECTED]> Sent: Monday, October 04, 2004 2:36 AM Subject: Re: [PHP-DB] Arabic characters displayed as garbage !! By default, MySQL uses the ISO-8859-1 (Latin1) character set. I guess you need to set this parameter to something suitable for Arabic (if it is supported by MySQL). I suggest you read "The Character Set Used for Data and Sorting" part of MySQL manual. That's all I can help with. Cheers yes I did .. and the problem only happens for arabic text stored in database <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] Did you set a character encoding on your page to Arabic? (eg. ISO-8859-6) > Hi, > > I'm working on a website that needs to save and display Arabic characters. > I'm using MySQL database and no matter how I insert the data either using > phpMyAdmin or inserting it using a script of my own, when I try to show > (display) the data I previously saved (which contains Arabic characters), > the output is rubbish and has no relation with the words I saved > > the script I'm using for displaying the data is as simple as the following > one > > //=== > include("db.php"); > $result = mysql_query("select * from mem_applications"); > if ($result) > { >while ($row = mysql_fetch_array($result)) >{ > echo $row['first_name']; > echo ""; > echo $row['mid_name']; > echo ""; > echo $row['last_name']; > echo ""; >} > } > ?> > //=== > > Thanks in advance > > -- > PHP Database Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DB] Arabic characters displayed as garbage !!
Hi, I might be able to help. I've done a website that uses Chinese characters. I have to store the data in a BLOP mysql field. Then use the correct ISO for the webpage display. Try that. Han - Original Message - From: <[EMAIL PROTECTED]> To: "Dre" <[EMAIL PROTECTED]> Cc: <[EMAIL PROTECTED]> Sent: Monday, October 04, 2004 2:36 AM Subject: Re: [PHP-DB] Arabic characters displayed as garbage !! By default, MySQL uses the ISO-8859-1 (Latin1) character set. I guess you need to set this parameter to something suitable for Arabic (if it is supported by MySQL). I suggest you read "The Character Set Used for Data and Sorting" part of MySQL manual. That's all I can help with. Cheers yes I did .. and the problem only happens for arabic text stored in database <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] Did you set a character encoding on your page to Arabic? (eg. ISO-8859-6) > Hi, > > I'm working on a website that needs to save and display Arabic characters. > I'm using MySQL database and no matter how I insert the data either using > phpMyAdmin or inserting it using a script of my own, when I try to show > (display) the data I previously saved (which contains Arabic characters), > the output is rubbish and has no relation with the words I saved > > the script I'm using for displaying the data is as simple as the following > one > > //=== > include("db.php"); > $result = mysql_query("select * from mem_applications"); > if ($result) > { >while ($row = mysql_fetch_array($result)) >{ > echo $row['first_name']; > echo ""; > echo $row['mid_name']; > echo ""; > echo $row['last_name']; > echo ""; >} > } > ?> > //=== > > Thanks in advance > > -- > PHP Database Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php