Ok what is wrong with this sql statement?
$sql = "UPDATE $table_name SET
c_name=\"$c_name\",s_addy=\"$s_addy\",city=\"$city\",state=\"state\"zip=\"zi
p\",phone="\$phone\"";
The error I recieve is as follows
Warning: Unexpected character in input: '\' (ASCII=92) state=1 in
/path/to/wwwdemo_change.
when i perform query an mysql db, to insert a new record, the PHP says:
Warning: Supplied argument is not a valid MySQL result resource in
g:\wwwroot\phpusermanager-1.0\add_order.php on line 24
the snippet is as follows
why the argument isn't valid? how to solve this problem?
--
PHP Databa
Hello guys
Does anybody have a clue on what wrong with the following sentence?
select author_code from author where author_code not in
(select author_code from authorxcat);
Thanks
***
I've got a database table with a whole list of "windows" file paths.
eg
Advent Tower PC\C\Program Files\Microsoft Office\Microsoft Binder.lnk
Advent Tower PC\C\Program Files\Microsoft Office\Microsoft Excel.lnk
Advent Tower PC\C\Program Files\Microsoft Office\Microsoft Office Setup.lnk
Advent Tower
When I run any kind of query this is the value of result Resource id #2
Example
$result= mysql_query (" Select * from ACCT_TBL ") or die
("Error".mysql_error());
print result;
any ideas?
randy
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For
I've been racking my brain and the web for finding a solution and no
luck so far.
Here's the form:
$display_block .= "Input item: Item ID:Quantity: ";
$display_block .= "01";
for ($i=2; $i < 301; $i++){
$display_block .= "$i";
}
$display_block .= "Price:";
And here is the additem.php file w
Try putting single quotes around your variables in your update statement
instead of the escaped double quotes, they are easier to read.
Also, were you wanting to update all entries in that table to the same,
c_name, s_addy, city, state, zip and phone? If not, you will need to
add 'where id=$
Ok jas
> Ok what is wrong with this sql statement?
> $sql = "UPDATE $table_name SET
> c_name=\"$c_name\",s_addy=\"$s_addy\",city=\"$city\",state=\"state\"zip=\"zi
> p\",phone="\$phone\"";
insufficient checking:
comma missing between state and zip
" incorrectly escaped before phone
...
> I have
Did you type this out or cut/paste? There was a comma missing between >>>
state"\"zip <<<. Should work when you add the comma.
Add a WHERE condition for the update, otherwise every row will be set to
these values.
Common practice is to use single quotes around the char variables, saves a
lot
On Sunday 05 May 2002 14:44, erich wrote:
> when i perform query an mysql db, to insert a new record, the PHP says:
>
> Warning: Supplied argument is not a valid MySQL result resource in
> g:\wwwroot\phpusermanager-1.0\add_order.php on line 24
>
> the snippet is as follows
> // connect to the dat
Echo your INSERT statement, so that you know what it looks like, if you
have the values you expect, field names are spelled correctly. that you're
not inserting char into int, etc.
Use mysql_errno() and mysql_err() (Check those against manual to determine
what error you are getting. Use mysql_
cc:
Subject: [PHP-DB] Query error
lts into 'x', 'y', 'z'
format, then do something like
"select author_code from author where author_code not in ($previousResults)"
HTH
Beau
// -Original Message-
// From: Wilmar Perez [mailto:[EMAIL PROTECTED]]
// Sent: Wednesday, 2 Octo
Looks fine, now retrieve the rows from the query.
> -Original Message-
> From: Randy Johnson [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, January 25, 2001 12:46 PM
> To: [EMAIL PROTECTED]
> Subject: [PHP-DB] query error
>
>
> When I run any kind of query thi
From: "Robert Sossomon" <[EMAIL PROTECTED]>
> And here is the additem.php file where it check for the info in the
> field and it is erroring out.
It would be rather useful to know the error...
> $get_iteminfo = "select * from GCN_items where 'item_num' LIKE
> '%$_POST[sel_item_id]%'";
Take aw
t Sossomon; [EMAIL PROTECTED]
Subject: Re: [PHP-DB] Query Error
From: "Robert Sossomon" <[EMAIL PROTECTED]>
> And here is the additem.php file where it check for the info in the
> field and it is erroring out.
It would be rather useful to know the error...
> $get_
From: "Robert Sossomon" <[EMAIL PROTECTED]>
> The errors as it prints are:
>
> The query I just ran was: select * from GCN_items where `item_num` =
> '%fm-a294%'
> The query I just ran was: Resource id #2
> 0
Those aren't errors; it's just what you asked the script to display. Your
query simply
or a horse!
-Original Message-
From: CPT John W. Holmes [mailto:[EMAIL PROTECTED]
Sent: Tuesday, November 04, 2003 1:31 PM
To: Robert Sossomon; [EMAIL PROTECTED]
Subject: Re: [PHP-DB] Query Error
From: "Robert Sossomon" <[EMAIL PROTECTED]>
> The err
18 matches
Mail list logo