On 4/9/2004 5:22:12 PM, John Nichel ([EMAIL PROTECTED]) wrote:
> John W. Holmes wrote:
> > From: "John Nichel" <[EMAIL PROTECTED]>
> >
> >>>Don't use single quotes.
> >>>
> >>
> >>$sql = "INSERT INTO table (id, name) VALUES ( '" . $id . "', '" . $name
> >>. "')
> >
> >
> > awww, come on... someone
John W. Holmes wrote:
From: "John Nichel" <[EMAIL PROTECTED]>
Don't use single quotes.
$sql = "INSERT INTO table (id, name) VALUES ( '" . $id . "', '" . $name
. "')
awww, come on... someone besides me had to understand wtf Ryan was
blabbering about, right
;) ;) ;)
---John Holmes...
I have
> You have to eval() the code from the database to get the variables
> replaced
> (or use a regex).
>
> $name = 'John';
> $str = file_get_contents('test.txt'); //Reads "Hello $name"
> eval('$str = "' . $str . '";');
> echo $str;
> ?>
Hi John,
That didn't work (eval i dont know regex well enou
From: "John Nichel" <[EMAIL PROTECTED]>
> > Don't use single quotes.
> >
>
> $sql = "INSERT INTO table (id, name) VALUES ( '" . $id . "', '" . $name
> . "')
awww, come on... someone besides me had to understand wtf Ryan was
blabbering about, right
;) ;) ;)
---John Holmes...
--
PHP General
Jason Wong wrote:
On Friday 09 April 2004 22:24, Ryan A wrote:
If that is the case you could modify your insert query:
INSERT INTO table (id, name) VALUES ('$id', '$name')
No, thats not the problem, its inserting the text "$id" and "$name" instead
of the
values the variables hold.
Don't use sin
On Friday 09 April 2004 22:24, Ryan A wrote:
> > If that is the case you could modify your insert query:
> > INSERT INTO table (id, name) VALUES ('$id', '$name')
>
> No, thats not the problem, its inserting the text "$id" and "$name" instead
> of the
> values the variables hold.
Don't use single
From: "Ryan A" <[EMAIL PROTECTED]>
> 2. The query also checks if I have a stored sql statement for this C_ID
> 2a. If "YES" it tries to execute the query (if NO, execution stops here,
all
> is well)
>
> 3.The stored SQL is usually something like "insert into
> tester('$client_id','$client_name')"
Hey Richard,
Thanks for replying.
> If that is the case you could modify your insert query:
> INSERT INTO table (id, name) VALUES ('$id', '$name')
No, thats not the problem, its inserting the text "$id" and "$name" instead
of the
values the variables hold.
Ideas?
Thanks,
-Ryan
>
> > Hi,
> >
Not quite sure what you mean...
So I assume the data was written into the worng fields.
If that is the case you could modify your insert query:
INSERT INTO table (id, name) VALUES ('$id', '$name')
hth
Richard
Friday, April 9, 2004, 4:11:05 PM, you wrote:
> Hi,
> I am getting 2 values from a fo
Hi,
I am getting 2 values from a form:
$client_id and $client_name (for understanding: client_id = '12'
name='ryan')
when the client submits the form:
1. I run a query in my php script inserts this data into the db,assigns a
C_ID.
2. The query also checks if I have a stored sql statement for thi
10 matches
Mail list logo