Re: [PHP] Re: PHP and MySQL SELECT COUNT (*)

2008-09-18 Thread Vinny Gullotta
Thanks all, I appreciate the follow ups and the help with the code. I'm still relatively new with this stuff, and never had any formal training, it's all just been learn as I go, and I have to learn fast as this project is relatively urgent to get completed. I plan on going through all of my

Re: [PHP] Re: PHP and MySQL SELECT COUNT (*)

2008-09-17 Thread Micah Gersten
While it's true that '.' concatenates and ',' is a list separator, The comma is actually more appropriate in this instance since you are just outputting each piece. It saves the overhead of concatenation before output. Thank you, Micah Gersten onShore Networks Internal Developer

Re: [PHP] Re: PHP and MySQL SELECT COUNT (*)

2008-09-17 Thread Nathan Rixham
learn something new every day! cheers Micah :) Micah Gersten wrote: While it's true that '.' concatenates and ',' is a list separator, The comma is actually more appropriate in this instance since you are just outputting each piece. It saves the overhead of concatenation before output. Thank

Re: [PHP] Re: PHP and MySQL SELECT COUNT (*)

2008-09-17 Thread Chris
1: SQL in mysql queries /should/ use backticks (`) around database, table and column names, stop's them getting confused with variables or reserved words (like timestamp) and saves you future trouble :) .. which is a mysql-ism - no other database supports this. As soon as you need to use

Re: [PHP] Re: [PHP-INSTALL] MySQL connector installation/upgrade problems

2007-10-23 Thread David Christopher Zentgraf
On 23. Oct 2007, at 20:33, Colin Guthrie wrote: If you compile PHP and it finds v3 of mysql that means that you must have the old development libraries for mysql 3 installed in some capacity (I believe). What is the output of: rpm -qa --nosignature --nodigest | grep -i mysql This should give

Re: [PHP] Re: [PHP-INSTALL] MySQL connector installation/upgrade problems

2007-10-23 Thread Colin Guthrie
David Christopher Zentgraf wrote: On 23. Oct 2007, at 20:33, Colin Guthrie wrote: If you compile PHP and it finds v3 of mysql that means that you must have the old development libraries for mysql 3 installed in some capacity (I believe). What is the output of: rpm -qa --nosignature

Re: [PHP] Re: [PHP-INSTALL] MySQL connector installation/upgrade problems

2007-10-23 Thread David Christopher Zentgraf
On 23. Oct 2007, at 21:07, Colin Guthrie wrote: No, I reckon Jul 5th could be about right when was .45 released? I had it in my head it was august but Jul doesn't seem too far before that so entirely possible. Ah sorry, I was thinking about source installs. RPMs keep the original

Re: [PHP] Re: [PHP-INSTALL] MySQL connector installation/upgrade problems

2007-10-23 Thread Colin Guthrie
David Christopher Zentgraf wrote: $ rpm -V MySQL-devel-community-5.0.45-0.rhel3 missing d /usr/share/man/man1/comp_err.1.gz missing d /usr/share/man/man1/mysql_config.1.gz I suppose this is, albeit not ideal, tolerable? Yeah this is fine. Your system is probably not setup to install docs

Re: [PHP] Re: [PHP-INSTALL] MySQL connector installation/upgrade problems

2007-10-23 Thread Colin Guthrie
David Christopher Zentgraf wrote: On 23. Oct 2007, at 17:22, Colin Guthrie wrote: Do rpm -qa --nosignature | grep -i mysql and see what old libraries you have lying around. Specifically look for the devel libraries/packages. Remove the 3.x versions via RPM and make sure you've installed the

Re: [PHP] Re: PHP any Mysql connection- new b

2005-01-09 Thread Sagar C Nannapaneni
that PHP5 has released...i dont see any good reason why u r still using php 3. /sagar - Original Message - From: M. Sokolewicz [EMAIL PROTECTED] To: php-general@lists.php.net Sent: Saturday, January 08, 2005 9:55 PM Subject: [PHP] Re: PHP any Mysql connection- new b php 3.0???! man, you

Re: [PHP] Re: PHP 5 MySql 4.1 issue - can't connect to mysql.sock

2004-12-20 Thread Barley
Bingo. Many thanks. Barley wrote: If I run the script from a shell prompt as root, it outputs Yes. If I run as any other user, it outputs No. It also gives this error: Warning: mysqli_connect(): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (13) Check

Re: [PHP] Re: PHP and MySQL date

2003-12-15 Thread John W. Holmes
Cesar Aracena wrote: I tried what both of you told me and I found very easy to use the datetime value under MySQL and then fetch it using strtotime() as fireball at sizzling dot com recommended at the User Contributed Notes of php.net's function.date.php page rather than using mktime() which can

Re: [PHP] Re: php caches mysql connections to same host

2003-06-24 Thread Robert Cummings
See the new_link parameter option for mysql_connect. It should solve your problem. On the other hand, what you are doing is fine, I did it for my pool since I can't use the new_link option because I'm retaining compatibility back to PHP 4.1.2 Cheers, Rob. dorgon wrote: for better

Re: [PHP] Re: PHP and MySQL bug

2003-01-08 Thread Nuno Lopes
, January 07, 2003 5:06 PM Subject: Re: [PHP] Re: PHP and MySQL bug @mysql_select_db(be); -- this failed do echo mysql_error(); to see what went wrong Nuno Lopes wrote: I done a echo of Mysql_error and it returned: 'Nenhum banco de dados foi selecionado' (I have the mysql server

Re: [PHP] Re: PHP and MySQL bug

2003-01-08 Thread Nuno Lopes
4:12 PM Subject: RE: [PHP] Re: PHP and MySQL bug Since nobody is jumping in to say it is some simple configuration/setting personally my next step would be to shut down all services on the box that aren't absolutely necessary and stop everything in the registry under run and stop anything

Re: [PHP] Re: PHP and MySQL bug

2003-01-07 Thread Nuno Lopes
:28 PM Subject: RE: [PHP] Re: PHP and MySQL bug This definitely sounds like a buggy installation or there may be some problem with the communication between the web server and the mysqld. Is the db on a different machine? Try using mysql_pconnect instead of connect just to see what result you

Re: [PHP] Re: PHP and MySQL bug

2003-01-07 Thread Marek Kilimajer
') - Original Message - From: David Freeman [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Sunday, January 05, 2003 10:29 PM Subject: RE: [PHP] Re: PHP and MySQL bug @MYSQL_QUERY(UPDATE d SET h='$h' WHERE id='$id'); // this query doesn't work Personally, I'd call it bad programming

Re: [PHP] Re: PHP and MySQL bug

2003-01-07 Thread Nuno Lopes
I'm using Windows 2000. - Original Message - From: Cleber [EMAIL PROTECTED] To: Nuno Lopes [EMAIL PROTECTED] Sent: Tuesday, January 07, 2003 10:23 AM Subject: Re: [PHP] Re: PHP and MySQL bug Try add to /etc/hosts the name and ip of DB is located - Original Message - From

Re: [PHP] Re: PHP and MySQL bug

2003-01-06 Thread Nuno Lopes
, January 05, 2003 10:29 PM Subject: RE: [PHP] Re: PHP and MySQL bug @MYSQL_QUERY(UPDATE d SET h='$h' WHERE id='$id'); // this query doesn't work Personally, I'd call it bad programming practice to do a database update and not check to see if it worked or not. In this case, how are you

RE: [PHP] Re: PHP and MySQL bug

2003-01-05 Thread David Freeman
@MYSQL_QUERY(UPDATE d SET h='$h' WHERE id='$id'); // this query doesn't work Personally, I'd call it bad programming practice to do a database update and not check to see if it worked or not. In this case, how are you determining that the query did not work? Are you manually checking

Re: [PHP] Re: PHP and MySQL bug

2003-01-04 Thread Michael J. Pawlowsky
Personally I say get yourself a good simple dbconnect class and make life easy. Also if you ever change users, database name etc, you onlu have one place to replace it in your code. I wrote mine based on http://www.vtwebwizard.com/tutorials/mysql/ Take a look at it. Nice and simple. Mike

Re: [PHP] Re: PHP and MySQL bug

2003-01-04 Thread Michael J. Pawlowsky
Personally I think the problem lies somewhere between the chair and the keyboard (Sorry, couldn't resist) :-) *** REPLY SEPARATOR *** On 04/01/2003 at 4:58 PM Stefan Hinz, iConnect (Berlin) wrote: It doesn't work because of the /* Some code including ... */ part ;-)

RE: [PHP] Re: PHP and mySQL

2002-05-13 Thread John Holmes
] Re: PHP and mySQL I presume that quantity is the number of books that the person has ordered, and therefore it needs to be a variable (ie with a $ infront of it) and its also best to do the calculation outside of the SQL statement just to be sure it works, eg: if ($submit){ if(isset

RE: [PHP] Re: PHP with MySQL

2002-05-03 Thread .ben
:[EMAIL PROTECTED]] Sent: 03 May 2002 02:28 To: [EMAIL PROTECTED] Subject: [PHP] Re: PHP with MySQL Typically it's done like: $db = mysql_connect('localhost','username','password'); The MySQL database detects what host you're connecting from, and appends that to your username. I'm not sure

RE: [PHP] Re: PHP with MySQL

2002-05-03 Thread .ben
-Original Message- From: Jon Haworth [mailto:[EMAIL PROTECTED]] Sent: 03 May 2002 11:34 To: '[EMAIL PROTECTED]'; PHP Subject: RE: [PHP] Re: PHP with MySQL Hi .ben, Just out of interest, what's the standard/best/tried tested method for handling errors in relation to connecting to DB's

RE: [PHP] Re: PHP with MySQL

2002-05-03 Thread Jon Haworth
Hi Ben, John, presumably I can leave the error reporting on - but pipe it into a file if i wanted, rather than displaying on screen, and then redirect the user to another page? Of course you can - I generally have my pages send me email when they throw an error, but that's because I'm

RE: [PHP] Re: PHP with MySQL

2002-05-03 Thread .ben
: [PHP] Re: PHP with MySQL Hi Ben, John, presumably I can leave the error reporting on - but pipe it into a file if i wanted, rather than displaying on screen, and then redirect the user to another page? Of course you can - I generally have my pages send me email when they throw

RE: [PHP] Re: PHP with MySQL

2002-05-03 Thread John Holmes
] Re: PHP with MySQL Oh, i agree entirely. Ok, i'll look into the logging/mailing solution - something i've been doing in ASP for years but am new to in PHP. Cheers, .b -Original Message- From: Jon Haworth [mailto:[EMAIL PROTECTED]] Sent: 03 May 2002 11:57 To: '[EMAIL

RE: [PHP] Re: PHP with MySQL

2002-05-03 Thread .ben
Thanks John. -Original Message- From: John Holmes [mailto:[EMAIL PROTECTED]] Sent: 03 May 2002 16:29 To: [EMAIL PROTECTED]; 'PHP' Subject: RE: [PHP] Re: PHP with MySQL There's a whole section in the manual on it. There is a log_error() or errorlog() function that'll write your

RE: [PHP] Re: PHP and mySQL

2002-03-05 Thread Dan Vande More
; echo username: .$row[username].br\n; } } mysql_free_result($result); ? -Original Message- From: David Robley [mailto:[EMAIL PROTECTED]] Sent: Tuesday, March 05, 2002 8:29 PM To: [EMAIL PROTECTED] Subject: [PHP] Re: PHP and mySQL In article 180f01c1c403$2ac62820