[PHP-DB] Re: newbie question on PHP & Mysql...

2005-09-21 Thread Evert Meulie
s empty it still get '' (empty) as part of the query - Original Message - From: "Sylvain Gourvil" <[EMAIL PROTECTED]> To: Sent: Wednesday, September 21, 2005 3:26 PM Subject: [PHP-DB] Re: newbie question on PHP & Mysql... Evert Meulie wrote: Hi! I

Re: [PHP-DB] Re: newbie question on PHP & Mysql...

2005-09-21 Thread Ziv Gabel
rom: "Sylvain Gourvil" <[EMAIL PROTECTED]> To: Sent: Wednesday, September 21, 2005 3:26 PM Subject: [PHP-DB] Re: newbie question on PHP & Mysql... Evert Meulie wrote: Hi! I've tried your suggestions, but still get the same error message. The 'print_r($result);' t

[PHP-DB] Re: newbie question on PHP & Mysql...

2005-09-21 Thread Sylvain Gourvil
Evert Meulie wrote: Hi! I've tried your suggestions, but still get the same error message. The 'print_r($result);' that I added does not print anything, so that would explain why I get the errors. My idea is to call this script with a value, like: script.php value Doesn't that put the value

[PHP-DB] Re: newbie question on PHP & Mysql...

2005-09-21 Thread Evert Meulie
Hi! I've tried your suggestions, but still get the same error message. The 'print_r($result);' that I added does not print anything, so that would explain why I get the errors. My idea is to call this script with a value, like: script.php value Doesn't that put the value in $argv[1] ? Regar

[PHP-DB] Re: newbie question on PHP & Mysql...

2005-09-21 Thread Sigrid Krug
Hi Evert, try: echo mysql_result($result,0,0), "\n"; echo mysql_result($result,0,1); You forgot a zero... Regards, Sigrid "Evert Meulie" <[EMAIL PROTECTED]> schrieb im Newsbeitrag news:[EMAIL PROTECTED] > Hi all! > > I'm taking my first steps with PHP & MySQL. > > Can anyone give me a hint on w

[PHP-DB] Re: newbie question on PHP & Mysql...

2005-09-21 Thread Sigrid Krug
Hi Evert, try: echo mysql_result($result,0,0), "\n"; echo mysql_result($result,0,1); You forgot a zero... Regards, Sigrid "Evert Meulie" <[EMAIL PROTECTED]> schrieb im Newsbeitrag news:[EMAIL PROTECTED] > Hi all! > > I'm taking my first steps with PHP & MySQL. > > Can anyone give me a hint on w

Re: [PHP-DB] Re: newbie question on PHP & Mysql...

2005-09-21 Thread Unnawut Leepaisalsuwanna
Hi, I guess you used a single quote over the query so the text, $argv[1], was entered into the query rather than the value inside it. try: $result = mysql_query('SELECT SUM(AcctInputOctets), SUM(AcctOutputOctets) FROM radacct WHERE username = ' .$argv[1] ); OR $result = mysql_query("SELECT SU

[PHP-DB] Re: newbie question on PHP & Mysql...

2005-09-21 Thread Sylvain Gourvil
Hi ! Could you do a "print_r($result)" after your mysql_query ? Or you sure of your argv[1] ? Sylvain Gourvil Evert Meulie wrote: Hi all! I'm taking my first steps with PHP & MySQL. Can anyone give me a hint on why this would not work? * $result = mysql_query('SELECT S