Re: [PHP] is this the correct syntax

2005-05-06 Thread Jochem Maas
Mathieu Dumoulin wrote:
Prathaban look carefully, we are here to give acurate info and you are 
giving mistaken information. The $id thing is wrong, you'll actually 
create a parse error X|
a more correct answer would have been:
there is not way to know for sure whether the syntax is correct (
lets assume the PO was referring to the SQL syntax).
1. because the DB engine used is not specified (ok so its probably mySQL!)
2. the values of the vars in the string that $query is set to are not
mentioned (they could contain anything, i.e. something that breaks the SQL 
syntax)
to-the-OP
HAVE YOU TRIED RUNNING THE QUERY??? trying things out is 'sometimes' quite a
good way of determining the validity of the syntax that you are unsure about.
/to-the-OP
BTW: its probably not worth mentioning that it was not really a php question
to begin with right? ;-)
...
Prathaban Mookiah wrote:
It should be $id.
Note that missing 
Prathap
-- Original Message ---
From: Ross [EMAIL PROTECTED]
To: php-general@lists.php.net
Sent: Thu, 5 May 2005 12:09:18 +0100
Subject: [PHP] is this the correct syntax

Am trying to do an update of a record...
Is this the correct syntax..
$query= UPDATE $table_name SET fname='$fname', sname='$sname' WHERE 
id= $id;

R.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

--- End of Original Message ---

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] is this the correct syntax

2005-05-05 Thread Prathaban Mookiah
It should be $id.

Note that missing 


Prathap


-- Original Message ---
From: Ross [EMAIL PROTECTED]
To: php-general@lists.php.net
Sent: Thu, 5 May 2005 12:09:18 +0100
Subject: [PHP] is this the correct syntax

 Am trying to do an update of a record...
 
 Is this the correct syntax..
 
  $query= UPDATE $table_name SET fname='$fname', sname='$sname' 
 WHERE id= $id;
 
 R.
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
--- End of Original Message ---

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] is this the correct syntax

2005-05-05 Thread Mathieu Dumoulin
Prathaban look carefully, we are here to give acurate info and you are 
giving mistaken information. The $id thing is wrong, you'll actually 
create a parse error X|

...
Prathaban Mookiah wrote:
It should be $id.
Note that missing 
Prathap
-- Original Message ---
From: Ross [EMAIL PROTECTED]
To: php-general@lists.php.net
Sent: Thu, 5 May 2005 12:09:18 +0100
Subject: [PHP] is this the correct syntax

Am trying to do an update of a record...
Is this the correct syntax..
$query= UPDATE $table_name SET fname='$fname', sname='$sname' 
WHERE id= $id;

R.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--- End of Original Message ---
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php