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 co

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 an

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 y

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 http://www.onshor

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 and MySQL bug

2003-01-08 Thread Nuno Lopes
QL List" <[EMAIL PROTECTED]> Sent: Tuesday, January 07, 2003 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 absol

Re: [PHP] Re: PHP and MySQL bug

2003-01-08 Thread Nuno Lopes
t;MySQL List" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> Sent: Tuesday, 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: > &

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

Re: [PHP] Re: PHP and MySQL bug

2003-01-07 Thread Marek Kilimajer
'no db was selected') - 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=

Re: [PHP] Re: PHP and MySQL bug

2003-01-07 Thread Nuno Lopes
ED]> Sent: Monday, January 06, 2003 6: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_

Re: [PHP] Re: PHP and MySQL bug

2003-01-06 Thread Nuno Lopes
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

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 checkin

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 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

2002-05-13 Thread John Holmes
Why can't you use one query? UPDATE Book2 SET stock = stock - $quantity WHERE stock >= $quantity AND booktitle = '$booktitle' ---John Holmes... > -Original Message- > From: Matthew Ward [mailto:[EMAIL PROTECTED]] > Sent: Monday, May 13, 2002 11:52 AM > To: [EMAIL PROTECTED] > Subject: [

RE: [PHP] Re: PHP and mySQL

2002-03-05 Thread Dan Vande More
Max, PHP.net says: "Calls to mysql_result() should not be mixed with calls to other functions that deal with the result set. " I would use mysql_fetch_array which they say is MUCH faster, example of how you could use it: username='me' GROUP BY username"; $number_of_rows=mysql_num_rows($sqlinf