Re: [PHP] update query not working

2003-02-23 Thread Chris Hayes


print INPUT TYPE=\Submit\ NAME=\Submit\ Value=\Update\/td;
print /form;



if ($_POST['Update'])
{
print updated!!;
}
I do not see the statement updated!!! printed, but I cannot see anything
wrong with my syntax. Any help would be appreciated.
You are looking for a value, where the array is of the form
 $_POST['form_element_NAME'='form_element_VALUE'
So try looking for

if ($_POST['Submit']=='Update')
{
}


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


Re: [PHP] update query not working

2003-02-23 Thread Jason Wong
On Monday 24 February 2003 06:56, Peter Gumbrell wrote:
 I wonder if anyone can see why the following code is not working. this is
 taken from a larger functions, the rest of which seems to be working well:

 print INPUT TYPE=\Submit\ NAME=\Submit\ Value=\Update\/td;
 print td/tdtd/td/tr;

 print /table;
 print /form;
 if ($_POST['Update'])

[snip]

print_r($_POST) to see what it contains. It probably contains an entry named 
'Submit' as that is what you have named your submit button.

-- 
Jason Wong - Gremlins Associates - www.gremlins.biz
Open Source Software Systems Integrators
* Web Design  Hosting * Internet  Intranet Applications Development *
--
Search the list archives before you post
http://marc.theaimsgroup.com/?l=php-general
--
/*
Trying to be happy is like trying to build a machine for which the only
specification is that it should run noiselessly.
*/


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



Re: [PHP] Update query

2002-12-12 Thread Tim Ward
The best way would be to design the table so that it had an
item_id field that was an auto-incremented integer and not
updateable. It shouldn't be too late to add such a field, then it
can be passed from the form as a hidden field (as I assume
you're currently doing with $oldItemCode).

Tim Ward
http://www.chessish.com
mailto:[EMAIL PROTECTED]
- Original Message - 
From: Steve Jackson [EMAIL PROTECTED]
To: PHP General [EMAIL PROTECTED]
Sent: Thursday, December 12, 2002 9:00 AM
Subject: [PHP] Update query


 How do you update MySQL in the following way?
 I have designed a form which has all the fields in the database
 available to edit based on a user query. The query is a field called
 $ItemCode.
 
 If the user wants to change that $ItemCode field how do I update it? In
 other words how do I use PHP to update the database row called $ItemCode
 with a new $ItemCode where $ItemCode is $ItemCode?
 
 Here is what I've tried and failed at!
 $oldItemCode = $ItemCode;
 $query = update products
  set ItemCode='$newItemCode',
  ItemName ='$ItemName',
  catid = '$catid',
  price = '$price',
  description = '$description'
 shortdesc = '$shortdesc'
  where ItemCode='$oldItemCode';
 
 Steve Jackson
 Web Developer
 Viola Systems Ltd.
 http://www.violasystems.com
 [EMAIL PROTECTED]
 Mobile +358 50 343 5159
 
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 
 


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




Re: [PHP] Update query

2002-12-12 Thread Jason Wong
On Thursday 12 December 2002 17:00, Steve Jackson wrote:
 How do you update MySQL in the following way?
 I have designed a form which has all the fields in the database
 available to edit based on a user query. The query is a field called
 $ItemCode.

 If the user wants to change that $ItemCode field how do I update it? In
 other words how do I use PHP to update the database row called $ItemCode
 with a new $ItemCode where $ItemCode is $ItemCode?

 Here is what I've tried and failed at!

Please, when something doesn't work, you got to describe _HOW_ it doesn't 
work!

 $oldItemCode = $ItemCode;
   $query = update products
  set ItemCode='$newItemCode',
  ItemName ='$ItemName',
  catid = '$catid',
  price = '$price',
  description = '$description'
shortdesc = '$shortdesc'
  where ItemCode='$oldItemCode';

You seem to be missing a comma after -- description = '$description'

-- 
Jason Wong - Gremlins Associates - www.gremlins.biz
Open Source Software Systems Integrators
* Web Design  Hosting * Internet  Intranet Applications Development *

/*
We all know that no one understands anything that isn't funny.
*/


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




RE: [PHP] Update query

2002-12-12 Thread Steve Jackson
It doesn't work in that it doesn't update the database.
I have a form which when loaded takes a variable ItemCode from the
previous page (which gets the Itemcode from the DB) and puts it into a
hidden field which I call oldItemCode, then when I try to update the
$ItemCode row in the database with the edited changes using the
oldItemCode as an identifier it won't update - It goes to my error
message shown below. So what I'm asking is there anything I'm doing
wrong. I noted your points about the comma and have changed the code. 

?
$query = update products
 set ItemCode='$ItemCode',
 ItemName ='$ItemName',
 catid ='$catid',
 price = '$price',
 description = '$description',
 shortdesc = '$shortdesc',
 where ItemCode='$oldItemCode';
$result = mysql_query($query);
if (!$result)
{
echo table width='100%' border='0' cellspacing='0'
cellpadding='0' align='center' bgcolor='#629D39';
echo trtdimg
src='images/admin_orders_administrate.gif'/td/tr;
echo trtdnbsp;/td/tr;
echo trtdspan class='adminisoleipa'Could not change
details: please a href='mailto:[EMAIL PROTECTED]'click
here/a to email the administratorbrbr/span;
echo /td;
echo /tr;
echo /table;
}
else
{
echo table width='100%' border='0' cellspacing='0'
cellpadding='0' align='center' bgcolor='#629D39';
echo trtdimg
src='images/admin_orders_administrate.gif'/td/tr;
echo trtdnbsp;/td/tr;
echo trtdspan class='adminisoleipa'Your product has been
successfully editedbrbr/span;
echo /td;
echo /tr;
echo tr;
echo td;
echo a href='eshop_uploadproductpicture.php'img
src='images/admin_orders_upload.gif' border='0'/a;
echo /td/tr;
echo /table;
}
?


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




Re: [PHP] Update query

2002-12-12 Thread Bastian Vogt
Hi,

did you echo $query; and put the output into phpmyadmin?
Perhaps there's an error message that may help you

HTH,
Bastian

Steve Jackson schrieb:

 It doesn't work in that it doesn't update the database.
 I have a form which when loaded takes a variable ItemCode from the
 previous page (which gets the Itemcode from the DB) and puts it into a
 hidden field which I call oldItemCode, then when I try to update the
 $ItemCode row in the database with the edited changes using the
 oldItemCode as an identifier it won't update - It goes to my error
 message shown below. So what I'm asking is there anything I'm doing
 wrong. I noted your points about the comma and have changed the code.

 ?
 $query = update products
  set ItemCode='$ItemCode',
  ItemName ='$ItemName',
  catid ='$catid',
  price = '$price',
  description = '$description',
  shortdesc = '$shortdesc',
  where ItemCode='$oldItemCode';
 $result = mysql_query($query);
 if (!$result)
 {
 echo table width='100%' border='0' cellspacing='0'
 cellpadding='0' align='center' bgcolor='#629D39';
 echo trtdimg
 src='images/admin_orders_administrate.gif'/td/tr;
 echo trtdnbsp;/td/tr;
 echo trtdspan class='adminisoleipa'Could not change
 details: please a href='mailto:[EMAIL PROTECTED]'click
 here/a to email the administratorbrbr/span;
 echo /td;
 echo /tr;
 echo /table;
 }
 else
 {
 echo table width='100%' border='0' cellspacing='0'
 cellpadding='0' align='center' bgcolor='#629D39';
 echo trtdimg
 src='images/admin_orders_administrate.gif'/td/tr;
 echo trtdnbsp;/td/tr;
 echo trtdspan class='adminisoleipa'Your product has been
 successfully editedbrbr/span;
 echo /td;
 echo /tr;
 echo tr;
 echo td;
 echo a href='eshop_uploadproductpicture.php'img
 src='images/admin_orders_upload.gif' border='0'/a;
 echo /td/tr;
 echo /table;
 }
 ?


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




Re: [PHP] Update query

2002-12-12 Thread Jason Wong
On Thursday 12 December 2002 18:48, Steve Jackson wrote:
 It doesn't work in that it doesn't update the database.
 I have a form which when loaded takes a variable ItemCode from the
 previous page (which gets the Itemcode from the DB) and puts it into a
 hidden field which I call oldItemCode, then when I try to update the
 $ItemCode row in the database with the edited changes using the
 oldItemCode as an identifier it won't update - It goes to my error
 message shown below. So what I'm asking is there anything I'm doing
 wrong. I noted your points about the comma and have changed the code.

 ?
 $query = update products
  set ItemCode='$ItemCode',
  ItemName ='$ItemName',
  catid ='$catid',
price = '$price',
  description = '$description',
shortdesc = '$shortdesc',
  where ItemCode='$oldItemCode';
   $result = mysql_query($query);

You've got an extra comma after '$shortdesc' which you should remove.

-- 
Jason Wong - Gremlins Associates - www.gremlins.biz
Open Source Software Systems Integrators
* Web Design  Hosting * Internet  Intranet Applications Development *

/*
Conscious is when you are aware of something and conscience is when you
wish you weren't.
*/


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




RE: [PHP] update query based on array

2002-12-10 Thread Ford, Mike [LSS]
 -Original Message-
 From: Jason Dulberg [mailto:[EMAIL PROTECTED]]
 Sent: 09 December 2002 23:52
 
 So you mean do something like:
 
 input type=text name=category[15] value=Prep School
 input type=text name=rank[15] value=30 size=4
 input type=checkbox name=rankid[15] value=166
 
 Doesn't that create 2 additional arrays though?

Yes -- but how else are you going to get multiple values for each name from
your form to your PHP script?  Without the array subscripts on both category
and rank, you will only ever get one category and one rank passed to your
script.

Using the above, just do:

foreach ($_POST['rankid'] as $row, $rankid):
// in here, $rankid is the value of the current rankid[]
// $_POST['category'][$row] is associated category[] value
// $_POST['rank'][$row] is associated rank[] value
endforeach;

Cheers!

Mike

-
Mike Ford,  Electronic Information Services Adviser,
Learning Support Services, Learning  Information Services,
JG125, James Graham Building, Leeds Metropolitan University,
Beckett Park, LEEDS,  LS6 3QS,  United Kingdom
Email: [EMAIL PROTECTED]
Tel: +44 113 283 2600 extn 4730  Fax:  +44 113 283 3211 


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




RE: [PHP] update query based on array

2002-12-10 Thread Jason Dulberg
Thanks Mike, that fixed the problem that I had!

Jason

 -Original Message-
 From: Ford, Mike [LSS] [mailto:[EMAIL PROTECTED]]
 Sent: December 10, 2002 6:21 AM
 To: 'Jason Dulberg'
 Cc: [EMAIL PROTECTED]
 Subject: RE: [PHP] update query based on array
 
 
  -Original Message-
  From: Jason Dulberg [mailto:[EMAIL PROTECTED]]
  Sent: 09 December 2002 23:52
  
  So you mean do something like:
  
  input type=text name=category[15] value=Prep School
  input type=text name=rank[15] value=30 size=4
  input type=checkbox name=rankid[15] value=166
  
  Doesn't that create 2 additional arrays though?
 
 Yes -- but how else are you going to get multiple values for each 
 name from
 your form to your PHP script?  Without the array subscripts on 
 both category
 and rank, you will only ever get one category and one rank passed to your
 script.
 
 Using the above, just do:
 
 foreach ($_POST['rankid'] as $row, $rankid):
 // in here, $rankid is the value of the current rankid[]
 // $_POST['category'][$row] is associated category[] value
 // $_POST['rank'][$row] is associated rank[] value
 endforeach;
 
 Cheers!
 
 Mike
 
 -
 Mike Ford,  Electronic Information Services Adviser,
 Learning Support Services, Learning  Information Services,
 JG125, James Graham Building, Leeds Metropolitan University,
 Beckett Park, LEEDS,  LS6 3QS,  United Kingdom
 Email: [EMAIL PROTECTED]
 Tel: +44 113 283 2600 extn 4730  Fax:  +44 113 283 3211 
 

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




Re: [PHP] update query based on array

2002-12-09 Thread Jimmy Brake
not real sure of the setup of the form but if you have mutiple groups of
items to be updated then you should make the rank an array -- rank[pid#]

you should make all the items -- that are related part of the same group
-- by using [] 

On Mon, 2002-12-09 at 15:06, Jason Dulberg wrote:
 I am displaying a list of data (from an sql query) and some of the fields in
 that list are editable through a form. If the user chooses to edit one or
 more of the rows of data, they must click on a checkbox to add that row to
 an update array. The problem is that when I read that array to pass to an
 UPDATE sql statement, it only passes the last entry of the array.
 
 Here's an example of the data being passed:
 13 - 4 - UPDATE ranking SET category='Prep School', rank='30' WHERE pid=4
 14 - 169 - UPDATE ranking SET category='Prep School', rank='30' WHERE
 pid=169
 15 - 166 - UPDATE ranking SET category='Prep School', rank='30' WHERE
 pid=166
 
 The above is created based on the following html code:
 //the last row
 input type=text name=category value=Prep School
 input type=text name=rank value=30 size=4
 input type=checkbox name=rankid[15] value=166
 
 So as you can see, its only reading the last row and assigning its values to
 the data above as well.
 
 Here's what I'm using for the sql query:
 
 while(list($key,$val)=each($rankid)) {
$upd=mysql_query(UPDATE ranking SET category='$category', rank='$rank'
 WHERE pid=$val);
 }
 
 If anyone has any suggestions for fixing this problem, please let me know :)
 THanks
 
 
 __
 Jason Dulberg
 Extreme MTB
 http://extreme.nas.net
-- 
Jimmy Brake [EMAIL PROTECTED]


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




RE: [PHP] update query based on array

2002-12-09 Thread Jason Dulberg
So you mean do something like:

input type=text name=category[15] value=Prep School
input type=text name=rank[15] value=30 size=4
input type=checkbox name=rankid[15] value=166

Doesn't that create 2 additional arrays though?

Basically my form is just row after row of the html code above... each row
has a different ID of course. The update query should only update fields
with checked checkboxes.

Thanks for your input!

Jason


 -Original Message-
 From: Jimmy Brake [mailto:[EMAIL PROTECTED]]
 Sent: December 9, 2002 6:29 PM
 To: Jason Dulberg
 Cc: [EMAIL PROTECTED]
 Subject: Re: [PHP] update query based on array


 not real sure of the setup of the form but if you have mutiple groups of
 items to be updated then you should make the rank an array -- rank[pid#]

 you should make all the items -- that are related part of the same group
 -- by using []

 On Mon, 2002-12-09 at 15:06, Jason Dulberg wrote:
  I am displaying a list of data (from an sql query) and some of
 the fields in
  that list are editable through a form. If the user chooses to
 edit one or
  more of the rows of data, they must click on a checkbox to add
 that row to
  an update array. The problem is that when I read that array
 to pass to an
  UPDATE sql statement, it only passes the last entry of the array.
 
  Here's an example of the data being passed:
  13 - 4 - UPDATE ranking SET category='Prep School', rank='30'
 WHERE pid=4
  14 - 169 - UPDATE ranking SET category='Prep School', rank='30' WHERE
  pid=169
  15 - 166 - UPDATE ranking SET category='Prep School', rank='30' WHERE
  pid=166
 
  The above is created based on the following html code:
  //the last row
  input type=text name=category value=Prep School
  input type=text name=rank value=30 size=4
  input type=checkbox name=rankid[15] value=166
 
  So as you can see, its only reading the last row and assigning
 its values to
  the data above as well.
 
  Here's what I'm using for the sql query:
 
  while(list($key,$val)=each($rankid)) {
 $upd=mysql_query(UPDATE ranking SET category='$category',
 rank='$rank'
  WHERE pid=$val);
  }
 
  If anyone has any suggestions for fixing this problem, please
 let me know :)
  THanks
 
 
  __
  Jason Dulberg
  Extreme MTB
  http://extreme.nas.net
 --
 Jimmy Brake [EMAIL PROTECTED]



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




Re: [PHP] update query based on array

2002-12-09 Thread Jason Wong
On Tuesday 10 December 2002 07:06, Jason Dulberg wrote:
 I am displaying a list of data (from an sql query) and some of the fields
 in that list are editable through a form. If the user chooses to edit one
 or more of the rows of data, they must click on a checkbox to add that row
 to an update array. The problem is that when I read that array to pass to
 an UPDATE sql statement, it only passes the last entry of the array.

 Here's an example of the data being passed:
 13 - 4 - UPDATE ranking SET category='Prep School', rank='30' WHERE pid=4
 14 - 169 - UPDATE ranking SET category='Prep School', rank='30' WHERE
 pid=169
 15 - 166 - UPDATE ranking SET category='Prep School', rank='30' WHERE
 pid=166

 The above is created based on the following html code:
 //the last row
 input type=text name=category value=Prep School
 input type=text name=rank value=30 size=4

The above two are named the same for ALL your rows so it will take the value 
of the last row, hence your problem. In general, each of your form elements 
must have a unique name.

 input type=checkbox name=rankid[15] value=166

 So as you can see, its only reading the last row and assigning its values
 to the data above as well.

Name your rows something along the lines of:

input type=text name=rows[15][category] value=Prep School
input type=text name=rows[15][rank] value=30 size=4
input type=checkbox name=rows[15][rankid] value=166

input type=text name=rows[16][category] value=Prep School
input type=text name=rows[16][rank] value=30 size=4
input type=checkbox name=rows[16][rankid] value=166

Then to process:

  foreach ($rows as $row) {
echo $row['category'], $row['rank'], $row['rankid'];
  }

-- 
Jason Wong - Gremlins Associates - www.gremlins.biz
Open Source Software Systems Integrators
* Web Design  Hosting * Internet  Intranet Applications Development *

/*
Fudd's First Law of Opposition:
Push something hard enough and it will fall over.
*/


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




Re: [PHP] UPDATE Query

2002-09-01 Thread Tony Harrison

What about multiple tables? Can that be done?


Mark Charette [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 No, only one db at a time may be updated. The where clauses can contain
 multiple db.

 -Original Message-
 From: Sascha Braun [mailto:[EMAIL PROTECTED]]
 Sent: Saturday, August 31, 2002 7:04 PM
 To: PHP Mailingliste
 Subject: [PHP] UPDATE Query


 I want to know if its possible to update two databases with one query?

 Please look at this example:

 UPDATE news_db, newsreferenz_db SET news_db.head = 'DFB Pokalasfasf',
 news_db.text = 'alkfhaslk fl akshf lakshf lkahs lfk aslf yxvyxvyxvyxv',
 newsreferenz_db.kat_id = '3' WHERE news_db.id = '6' AND
 newsreferenz_db.news_id = '6'

 it doesn't work.




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




RE: [PHP] UPDATE Query

2002-08-31 Thread Mark Charette

No, only one db at a time may be updated. The where clauses can contain
multiple db.

-Original Message-
From: Sascha Braun [mailto:[EMAIL PROTECTED]]
Sent: Saturday, August 31, 2002 7:04 PM
To: PHP Mailingliste
Subject: [PHP] UPDATE Query


I want to know if its possible to update two databases with one query?

Please look at this example:

UPDATE news_db, newsreferenz_db SET news_db.head = 'DFB Pokalasfasf',
news_db.text = 'alkfhaslk fl akshf lakshf lkahs lfk aslf yxvyxvyxvyxv',
newsreferenz_db.kat_id = '3' WHERE news_db.id = '6' AND
newsreferenz_db.news_id = '6'

it doesn't work.


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




RE: [PHP] UPDATE Query works in odbc/Mysql, but fails in odbc/MS Access

2001-12-06 Thread Andrew Hill

mweb,

MS points to a datetime issue:
http://support.microsoft.com/default.aspx?scid=kb;EN-US;q246570

As far as a reference - I'm guessing somewhere on MS's site?

Best regards,
Andrew Hill
Director of Technology Evangelism
OpenLink Software  http://www.openlinksw.com
Universal Data Access  Data Integration Technology Providers


 -Original Message-
 From: mweb [mailto:[EMAIL PROTECTED]]
 Sent: Thursday, December 06, 2001 7:30 AM
 To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
 Subject: [PHP] UPDATE Query works in odbc/Mysql, but fails in odbc/MS
 Access


 Hello,

 I have one MS Access DB on the server, and an exact
 (theoretically) copy of
 it in MySQL on my machine, so I can test PHP pages on Linux and
 install them
 on an NT server (using odbc of course).

 I can insert and select just fine, thankl to all your help. The
 problem is
 that this UPDATE query:
 UPDATE rec SET Aut = 1 WHERE Un = 2927230327;

 works perfectly on PHP/ODBC/MySQL on Linux, while on PHP/ODBC/ACCESS/
 it gives this error:

 Warning: SQL error: [Microsoft][ODBC Microsoft Access Driver] Data type
 mismatch in criteria expression., SQL state 22005 in SQLExecDirect in
 C:\domini\m.net\update_db.php on line 54
 No cursor

 Initially I though well, maybe I'm trying to write a string into
 a number, or
 something like that, but I can SELECT from that same table using the same
 format, so what is the trick? Different UPDATE syntax between MySQL and
 ACCESS? If so, where is an online ACCESS syntax reference?

   TIA,
   mweb

 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 To contact the list administrators, e-mail: [EMAIL PROTECTED]






-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Update Query - Urgent

2001-10-23 Thread Valentin V. Petruchek

Send your codes to mailing list.
If they are not very secret :)
- Original Message -
From: Srinivasan Ranganathan [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Tuesday, October 23, 2001 3:21 PM
Subject: [PHP] Update Query - Urgent


 Hi

 I have a php script generate a sql update statement.
 when i query the database, the update dosent happen.
 but when i echo the sql string and copy and paste it
 in my mysql client window, the update happens like it
 should!

 what am i missing/doing wrong here?

 Thanks in advance
 Srinivasan Ranganthan

 
 *NEW*   Connect to Yahoo! Messenger through your mobile phone   *NEW*
Visit http://in.mobile.yahoo.com/smsmgr_signin.html

 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 To contact the list administrators, e-mail: [EMAIL PROTECTED]





-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] Update Query - Urgent

2001-10-23 Thread Niklas Lampén

How about some code to see?


Niklas

-Original Message-
From: Srinivasan Ranganathan [mailto:[EMAIL PROTECTED]] 
Sent: 23. lokakuuta 2001 15:22
To: [EMAIL PROTECTED]
Subject: [PHP] Update Query - Urgent


Hi

I have a php script generate a sql update statement.
when i query the database, the update dosent happen.
but when i echo the sql string and copy and paste it
in my mysql client window, the update happens like it
should!

what am i missing/doing wrong here?

Thanks in advance
Srinivasan Ranganthan


*NEW*   Connect to Yahoo! Messenger through your mobile phone   *NEW*
   Visit http://in.mobile.yahoo.com/smsmgr_signin.html

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED] To
contact the list administrators, e-mail: [EMAIL PROTECTED]


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] Update Query - Urgent

2001-10-23 Thread Nicolas Guilhot

Do you login to the database with a write access or a read only account ??

-Message d'origine-
De : Srinivasan Ranganathan [mailto:[EMAIL PROTECTED]]
Envoyé : mardi 23 octobre 2001 14:22
À : [EMAIL PROTECTED]
Objet : [PHP] Update Query - Urgent


Hi

I have a php script generate a sql update statement.
when i query the database, the update dosent happen.
but when i echo the sql string and copy and paste it
in my mysql client window, the update happens like it
should!

what am i missing/doing wrong here?

Thanks in advance
Srinivasan Ranganthan


*NEW*   Connect to Yahoo! Messenger through your mobile phone   *NEW*
   Visit http://in.mobile.yahoo.com/smsmgr_signin.html

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]





-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Update Query - Urgent

2001-10-23 Thread Valentin V. Petruchek

What if use mysql_select_db()?
- Original Message -
From: Srinivasan Ranganathan [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Tuesday, October 23, 2001 4:22 PM
Subject: [PHP] Update Query - Urgent -- Yes, Full Rights!


 Hi

 Yes, I do have full rights!



 
 *NEW*   Connect to Yahoo! Messenger through your mobile phone   *NEW*
Visit http://in.mobile.yahoo.com/smsmgr_signin.html

 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 To contact the list administrators, e-mail: [EMAIL PROTECTED]






-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] Update Query - Urgent

2001-10-23 Thread Mark Roedel

 -Original Message-
 From: Srinivasan Ranganathan [mailto:[EMAIL PROTECTED]] 
 Sent: Tuesday, October 23, 2001 7:22 AM
 To: [EMAIL PROTECTED]
 Subject: [PHP] Update Query - Urgent
 
 
 I have a php script generate a sql update statement.
 when i query the database, the update doesn't happen.
 but when i echo the sql string and copy and paste it
 in my mysql client window, the update happens like it
 should!

After the update fails, does an 'echo mysql_error()' tell you anything
useful?


---
Mark Roedel   | Blessed is he who has learned to laugh
Systems Programmer|  at himself, for he shall never cease
LeTourneau University |  to be entertained.
Longview, Texas, USA  |  -- John Powell 

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Update Query - Urgent

2001-10-23 Thread Mak

What does the error message say? What sort of error is it?
- ycmak

- Original Message -
From: Mark Roedel [EMAIL PROTECTED]
To: Srinivasan Ranganathan [EMAIL PROTECTED];
[EMAIL PROTECTED]
Sent: Tuesday, October 23, 2001 9:35 PM
Subject: RE: [PHP] Update Query - Urgent


 -Original Message-
 From: Srinivasan Ranganathan [mailto:[EMAIL PROTECTED]]
 Sent: Tuesday, October 23, 2001 7:22 AM
 To: [EMAIL PROTECTED]
 Subject: [PHP] Update Query - Urgent


 I have a php script generate a sql update statement.
 when i query the database, the update doesn't happen.
 but when i echo the sql string and copy and paste it
 in my mysql client window, the update happens like it
 should!

After the update fails, does an 'echo mysql_error()' tell you anything
useful?


---
Mark Roedel   | Blessed is he who has learned to laugh
Systems Programmer|  at himself, for he shall never cease
LeTourneau University |  to be entertained.
Longview, Texas, USA  |  -- John Powell

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]


_
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Update Query - Urgent

2001-10-23 Thread Beeman

Does the form you are using to update use checkboxes??
what kind of values are being passed?
Mak [EMAIL PROTECTED] wrote in message
008001c15bc8$3c73e6a0$7e8f9cca@athlon700delta">news:008001c15bc8$3c73e6a0$7e8f9cca@athlon700delta...
 What does the error message say? What sort of error is it?
 - ycmak

 - Original Message -
 From: Mark Roedel [EMAIL PROTECTED]
 To: Srinivasan Ranganathan [EMAIL PROTECTED];
 [EMAIL PROTECTED]
 Sent: Tuesday, October 23, 2001 9:35 PM
 Subject: RE: [PHP] Update Query - Urgent


  -Original Message-
  From: Srinivasan Ranganathan [mailto:[EMAIL PROTECTED]]
  Sent: Tuesday, October 23, 2001 7:22 AM
  To: [EMAIL PROTECTED]
  Subject: [PHP] Update Query - Urgent
 
 
  I have a php script generate a sql update statement.
  when i query the database, the update doesn't happen.
  but when i echo the sql string and copy and paste it
  in my mysql client window, the update happens like it
  should!

 After the update fails, does an 'echo mysql_error()' tell you anything
 useful?


 ---
 Mark Roedel   | Blessed is he who has learned to laugh
 Systems Programmer|  at himself, for he shall never cease
 LeTourneau University |  to be entertained.
 Longview, Texas, USA  |  -- John Powell

 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 To contact the list administrators, e-mail: [EMAIL PROTECTED]


 _
 Do You Yahoo!?
 Get your free @yahoo.com address at http://mail.yahoo.com




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]