Re: [PHP-DB] Re: Newbie Question $2

2014-06-17 Thread Aziz Saleh
IMO a newbie is someone who read the docs and understood them (at least in theory) before they attempt to write code, which doesn't seem to be the case. On Tue, Jun 17, 2014 at 10:04 AM, Jim Giner wrote: > We're all so eager to help out poor Ethan (who many of you know is NOT a > newbie) but no

Re: [PHP-DB] Re: Newbie Question $2

2014-06-17 Thread Jim Giner
On 6/17/2014 10:51 AM, Lester Caine wrote: On 17/06/14 15:04, Jim Giner wrote: We're all so eager to help out poor Ethan (who many of you know is NOT a newbie) but nowhere does Ethan say what difficulty he is having. The suggestions made so far are great but what are we solving? I see you have

Re: [PHP-DB] Re: Newbie Question $2

2014-06-17 Thread Lester Caine
On 17/06/14 15:04, Jim Giner wrote: > We're all so eager to help out poor Ethan (who many of you know is NOT a > newbie) but nowhere does Ethan say what difficulty he is having. > > The suggestions made so far are great but what are we solving? I see you have spotted the original question :) The o

[PHP-DB] Re: Newbie Question $2

2014-06-17 Thread Jim Giner
Finally figured out what the question was! Here's a better version of your code Ethan: $phn = $_POST['phone']; // note the quotes on the index if (strlen($phn) <> 10) { echo "Error in phone number entry - must be 10 digits"; exit(); } $phn = mysqli_real_escape_string($cxn,$phn);

[PHP-DB] Re: Newbie Question $2

2014-06-17 Thread Jim Giner
We're all so eager to help out poor Ethan (who many of you know is NOT a newbie) but nowhere does Ethan say what difficulty he is having. The suggestions made so far are great but what are we solving? -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/u

[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

[PHP-DB] Re newbie question

2005-04-15 Thread Balwant Singh
i am doing the following for inserting values in MYSQL DB through PHP. $a = "hello"; $b = 1; $query = "INSERT INTO tablename (a, b) VALUES ('$a', '$b')"; try this with best wishes balwant - Original Message - From: Kenn Murrah <[EMAIL PROTECTED]> To: Sent: Wednesday, May 31, 2000 2:

[PHP-DB] Re: Newbie question

2004-03-30 Thread Kim Steinhaug
Well, Could be some sort of debugging mode on the PHP running on the server. On the other hand your script is depending on the fact that GLOBALS are turned on, which - you shouldnt. 1) Anywho - you form is using POST, so you should use this syntax : $_POST["variable"], if using GET the equ

[PHP-DB] Re: Newbie Question - PHP and MSACCESS

2003-02-16 Thread Fredrik de Vibe
[EMAIL PROTECTED] (J.M. Cocchini) writes: > $result = odbc_do($connection,"select * from events where id=$id"); > odbc_fetch_row($result); > > Am not understanding how to "print()" the fields in the rows, one after > the next, on the same line, and then do the same with the next record, > until a

[PHP-DB] Re: Newbie-Question: What's that @?

2002-10-31 Thread rolf vreijdenberger
there is no difference between the two! quote: " @mysql_query($query) and @mysql_query($query)? " haha but seriously, the @ supresses error messages from php, so these will not be outputted. No information on why or how, the query in this case, it failed. you can do this on a per function basis wit

[PHP-DB] Re: newbie question: request & response

2002-02-01 Thread Luke Crouch
The real reason I'm asking is because I want to design a PHP app that uses a similar framework to a current Java/JSP app I'm developing, and I will need to use a controller php file that forwards the request and response objects it receives to another php. Java Servlets do this nicely because ins

[PHP-DB] Re: newbie question: fetchrow or smth else ?

2002-02-01 Thread Alecs
okay, thanks for help ;-p fetchrow failed because my query was buggy, the proper syntax for left is LEFT(something, number) "Alecs" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > > Could some one please check the following code and guesstimate where am I >

[PHP-DB] re: newbie question: request & response

2002-01-30 Thread Oliver Cronk
No (not out of the box anyway) BUT the beauty of PHP is its much simpler than JSP or ASP's server.response() server.request() methods (sorry if thats not the exact syntax - I haven't done huge amounts of ASP/JSP work lately), in most cases you simply output the data (i.e. print / echo "something";

[PHP-DB] Re: Newbie Question

2001-11-21 Thread Lee Willmann
Ok, I think I have the solution to your problem. Try using nl2br() on the data in that field.. Example: I have a message table that allows one user to send an instant message to another user on my site. There are several fields, one of which being a TEXT column (MySQL db). I use a simple textare

[PHP-DB] Re: Newbie Question

2001-11-09 Thread Steve Brett
have a look at get_html_translation_table() in the php manual. there is an example of conversion of all special chars so they can be inserted into the database as text (i.e. £>£) and a cool way of 'decoding' them if you need to write them to a file. A Browser wil interpret them correctly when the

[PHP-DB] Re: Newbie Question

2001-11-08 Thread Kodrik
I wrote this cleanup function: function cleanup($copy) { $copy=trim($copy); $copy=htmlspecialchars($copy, ENT_QUOTES); $copy=eregi_replace ("%", "%", $copy); $copy=eregi_replace ("<", "<", $copy); $copy=eregi_replace (">", ">", $copy); $copy=eregi_r