Re: [PHP-DB] UPDATE query

2011-03-19 Thread Omega -1911
On Tue, Mar 8, 2011 at 11:16 AM, Ron Piggott wrote: > > I am wondering if there is a way to do an UPDATE query where only some of the > text changes. > > The column I need to modify is named “toll_free” > What I need to search for is: 800- > I need it to replace it with is 1-800- > - BUT I don’t

Re: [PHP-DB] UPDATE IF

2011-03-14 Thread Richard Quadling
On 14 March 2011 15:42, Gary wrote: > I have a table in a mysql db that has 3 columns that I want to insert > (update) data if the row&column is empty (IS NULL).  However I want to start > at the first column, if this column is not null, then move to insert the > data into column 2, if that is emp

[PHP-DB] UPDATE IF

2011-03-14 Thread Gary
I have a table in a mysql db that has 3 columns that I want to insert (update) data if the row&column is empty (IS NULL). However I want to start at the first column, if this column is not null, then move to insert the data into column 2, if that is empty, then insert data into column 3. I hav

Re: [PHP-DB] UPDATE query

2011-03-08 Thread Ron Piggott
Koert Sent: Tuesday, March 08, 2011 11:20 AM To: Ron Piggott Cc: php-db@lists.php.net Subject: Re: [PHP-DB] UPDATE query On Tue, Mar 8, 2011 at 11:16 AM, Ron Piggott wrote: I am wondering if there is a way to do an UPDATE query where only some of the text changes. The column I need to modify

Re: [PHP-DB] UPDATE query

2011-03-08 Thread Ron Piggott
I was wondering this Bastien. Ron The Verse of the Day “Encouragement from God’s Word” http://www.TheVerseOfTheDay.info -Original Message- From: Bastien Koert Sent: Tuesday, March 08, 2011 11:20 AM To: Ron Piggott Cc: php-db@lists.php.net Subject: Re: [PHP-DB] UPDATE query On Tue

Re: [PHP-DB] UPDATE query

2011-03-08 Thread Bastien Koert
On Tue, Mar 8, 2011 at 11:16 AM, Ron Piggott wrote: > > I am wondering if there is a way to do an UPDATE query where only some of the > text changes. > > The column I need to modify is named “toll_free” > What I need to search for is: 800- > I need it to replace it with is 1-800- > - BUT I don’t

[PHP-DB] UPDATE query

2011-03-08 Thread Ron Piggott
I am wondering if there is a way to do an UPDATE query where only some of the text changes. The column I need to modify is named “toll_free” What I need to search for is: 800- I need it to replace it with is 1-800- - BUT I don’t want to change instances of 1-800- - I need to leave the rest of

[PHP-DB] Update uploaded file help

2010-11-24 Thread Estelle George
Hi all, I am new to php, I am just learning it at the moment. I hope you can help me with my code. Thanks in advance! I want the page to allow users to edit or delete an existing uploaded file. But after testing the script in the browser the delete option is working 10 out 0f 10; but the

Re: [PHP-DB] UPDATE lot of registers

2009-10-19 Thread Chris
[ please always send to the mailing list ] Emiliano Boragina wrote: Hi Chris, thanks for your ask... This doubt was beacause I have two tables... one with categories (category id and category name), and the other with products (product id, product name, category id which the prod belong). The cl

Re: [PHP-DB] UPDATE lot of registers

2009-10-19 Thread Chris
Emiliano Boragina wrote: Hello everyone… I dont know how to update a lot of registers on one table. I have two tables: Students and Signatures STUDENTS has got: id / name / signature SIGNATURES has got: id / name / classroom I want to use words and not numbers to write the si

[PHP-DB] UPDATE lot of registers

2009-10-19 Thread Emiliano Boragina
Hello everyone… I dont know how to update a lot of registers on one table. I have two tables: Students and Signatures STUDENTS has got: id / name / signature SIGNATURES has got: id / name / classroom I want to use words and not numbers to write the signature on the STUDENTS table.

RE: [PHP-DB] UPDATE instead of INSERT INTO

2009-09-08 Thread Daevid Vincent
:19 PM > > To: php-db@lists.php.net > > Subject: [PHP-DB] UPDATE instead of INSERT INTO > > > > I made an application which lets users rate web site content. > > At the heart of the application is this mySQL query: > > > > INSERT INTO `ratings` ( `refere

Re: [PHP-DB] UPDATE instead of INSERT INTO

2009-09-05 Thread Ron Piggott
Thanks - Original Message - From: "Waynn Lue" To: "Ron Piggott" ; Sent: Saturday, September 05, 2009 4:45 PM Subject: Re: [PHP-DB] UPDATE instead of INSERT INTO INSERT INTO ON DUPLICATE KEY UPDATE is what you're looking for. On 9/5/09, Ron Piggott wro

Re: [PHP-DB] UPDATE instead of INSERT INTO

2009-09-05 Thread Waynn Lue
INSERT INTO ON DUPLICATE KEY UPDATE is what you're looking for. On 9/5/09, Ron Piggott wrote: > I made an application which lets users rate web site content. At the heart > of the application is this mySQL query: > > INSERT INTO `ratings` ( `reference` , `content_type` , `content_reference` , > `

[PHP-DB] UPDATE instead of INSERT INTO

2009-09-05 Thread Ron Piggott
I made an application which lets users rate web site content. At the heart of the application is this mySQL query: INSERT INTO `ratings` ( `reference` , `content_type` , `content_reference` , `language` , `ip_address` , `rating_timestamp` , `rating` ) VALUES ( NULL , '$content_type','$content_

RE: [PHP-DB] UPDATE syntax

2007-12-13 Thread TG
-you-wanna-call-them are used to be explicit with a name. -TG - Original Message - From: "Gary Wardell" <[EMAIL PROTECTED]> To: Date: Thu, 13 Dec 2007 19:33:57 -0500 Subject: RE: [PHP-DB] UPDATE syntax > Hi, > > I'm a beginner at PHP and MySql but a long

RE: [PHP-DB] UPDATE syntax

2007-12-13 Thread Gary Wardell
iod. Gary > -Original Message- > From: Ron Piggott [mailto:[EMAIL PROTECTED] > Sent: Thu, December 13, 2007 7:20 PM > To: php-db@lists.php.net > Subject: [PHP-DB] UPDATE syntax > > > Can anyone see something wrong with this syntax? > > UPDATE `advertisement

[PHP-DB] UPDATE syntax

2007-12-13 Thread Ron Piggott
Can anyone see something wrong with this syntax? UPDATE `advertisements` INNER JOIN `advertisements_rate_plans` ON `advertisements.rate_plan` = `advertisements_rate_plans.reference` SET `advertisements.displayed` = 0 WHERE `advertisements.start_date` <= '2007-12-13' AND `advertisements.end_date` >

Re: [PHP-DB] UPDATE with INNER JOIN?

2007-12-12 Thread Chris
Ron Piggott wrote: Is it possible to do an UPDATE with an INNER JOIN --- I want the WHERE to use 2 tables in selecting which rows are going to be updated in table1. http://dev.mysql.com/doc/refman/5.0/en/update.html You can also perform UPDATE operations covering multiple tables. However, you

[PHP-DB] UPDATE with INNER JOIN?

2007-12-12 Thread Ron Piggott
Is it possible to do an UPDATE with an INNER JOIN --- I want the WHERE to use 2 tables in selecting which rows are going to be updated in table1. Could you provide me with a simple example if this is possible using the following variables: table1 table2 table1.field1 table1.field2 table2.field1

RE: [PHP-DB] Update time/date stamp

2005-02-02 Thread Bastien Koert
'show table status' will return a record set that you can parse to get the last update time bastien From: Pete Holsberg <[EMAIL PROTECTED]> To: php-db@lists.php.net Subject: RE: [PHP-DB] Update time/date stamp Date: Wed, 2 Feb 2005 15:00:34 -0500 (EST) On Wed, 2 Feb 2005, Bas

RE: [PHP-DB] Update time/date stamp

2005-02-02 Thread Pete Holsberg
g with format, number of rows, row length and row size. So the last-updated information is in A table but not the table called directory. Sorry for the confusion. > > >From: Pete Holsberg <[EMAIL PROTECTED]> > >To: php-db@lists.php.net > >Subject: RE: [PHP-DB] Update t

RE: [PHP-DB] Update time/date stamp

2005-02-02 Thread Bastien Koert
so select max(last_updated) bastien From: Pete Holsberg <[EMAIL PROTECTED]> To: php-db@lists.php.net Subject: RE: [PHP-DB] Update time/date stamp Date: Wed, 2 Feb 2005 14:06:35 -0500 (EST) On Wed, 2 Feb 2005, Bastien Koert wrote: > is there a timestamp or data time field in the table? If

RE: [PHP-DB] Update time/date stamp

2005-02-02 Thread Pete Holsberg
On Wed, 2 Feb 2005, Bastien Koert wrote: > is there a timestamp or data time field in the table? If > so just quuery that field for the max value > > select max(dateTimeFieldName) from TableName No there isn't. When I view the table with phpMyAdmin, it displays a table that includes time/date s

RE: [PHP-DB] Update time/date stamp

2005-02-02 Thread Bastien Koert
is there a timestamp or data time field in the table? If so just quuery that field for the max value select max(dateTimeFieldName) from TableName bastien From: Pete Holsberg <[EMAIL PROTECTED]> To: Bastien Koert <[EMAIL PROTECTED]> CC: php-db@lists.php.net Subject: RE: [PHP-DB] Upda

RE: [PHP-DB] Update time/date stamp

2005-02-02 Thread Pete Holsberg
On Wed, 2 Feb 2005, Bastien Koert wrote: > any particular table? or just the db in general? It has just one table. --- Pete Holsberg Columbus, NJ --- "When the people are afraid of the government, that's tyranny. But when the government is afraid of the people, that's liberty." -- Thomas Jeffer

RE: [PHP-DB] Update time/date stamp

2005-02-02 Thread Bastien Koert
any particular table? or just the db in general? bastien From: Pete Holsberg <[EMAIL PROTECTED]> To: php-db@lists.php.net Subject: [PHP-DB] Update time/date stamp Date: Wed, 2 Feb 2005 10:56:08 -0500 (EST) I would like to print the date and time my database was last updated but don'

[PHP-DB] Update time/date stamp

2005-02-02 Thread Pete Holsberg
I would like to print the date and time my database was last updated but don't know the query for that. Ilooked at several websites that list MySQL variables but didn't find any that seemed to be what I want. Can anyone help? Thanks. --- Pete Holsberg Columbus, NJ --- "When the people are afrai

Re: [PHP-DB] Update multiple records

2005-01-11 Thread Martin Norland
Stumbling across some posts online, I noticed [some of] my messages were being sent as evil ugly HTML - so I'm going to do my best to post from Thunderbird for the list. Gotta keep OE configured as is for all the lovely meeting scheduling. Stuart Felenstein wrote: --- Jochem Maas <[EMAIL PROTE

Re: [PHP-DB] Update multiple records

2005-01-11 Thread Stuart Felenstein
--- Jochem Maas <[EMAIL PROTECTED]> wrote: > > if (count($inds) > 0 AND is_array($inds)) { > > $ind = "'".implode("','", $inds)."'"; > > } > > looks like you want to do a select statement with > $ind in the form of > "SELECT * FROM yourtable WHERE yourfield IN ($inds)" > Adding the IN cla

Re: [PHP-DB] Update multiple records

2005-01-10 Thread Jochem Maas
Stuart Felenstein wrote: --- Jochem Maas <[EMAIL PROTECTED]> wrote: don't be sorry, be pro-active and rewrite it until its idiot proof. its in your own best interest - the clearer you state your problem the greater the chance someone will/can help you. I don't know about anyone else, but I hav

Re: [PHP-DB] Update multiple records

2005-01-10 Thread Jochem Maas
Norland, Martin wrote: -Original Message- From: Jochem Maas [mailto:[EMAIL PROTECTED] Sent: Monday, January 10, 2005 11:59 AM Subject: Re: [PHP-DB] Update multiple records ... That's what I get for troubleshooting before lunch! My apologies to the list and to anyone unfortunate enou

Re: [PHP-DB] Update multiple records

2005-01-10 Thread Stuart Felenstein
--- Jochem Maas <[EMAIL PROTECTED]> wrote: > don't be sorry, be pro-active and rewrite it until > its idiot proof. its > in your own best interest - the clearer you state > your problem the > greater the chance someone will/can help you. > Well I've started with a clean slate. Meaning I ditc

Re: [PHP-DB] Update multiple records

2005-01-10 Thread Jochem Maas
Stuart Felenstein wrote: Having a problem here with updating multiple records in a table. as Martin Norland (a heavy hitter on this list AFAIKT) already stated you don't seem to be at the stage of actually doing an update, no big deal - only you are doing yourself an injustice by given a misle

RE: [PHP-DB] Update multiple records

2005-01-10 Thread Norland, Martin
> -Original Message- > From: Jochem Maas [mailto:[EMAIL PROTECTED] > Sent: Monday, January 10, 2005 11:59 AM > Subject: Re: [PHP-DB] Update multiple records [snip] > > This line in particular clearly warrants attention. Cookie to whoever > > guesses what&

Re: [PHP-DB] Update multiple records

2005-01-10 Thread Jochem Maas
Norland, Martin wrote: -Original Message- From: Stuart Felenstein [mailto:[EMAIL PROTECTED] Sent: Monday, January 10, 2005 10:40 AM Subject: [PHP-DB] Update multiple records Having a problem here with updating multiple records in a table. [snip] Lets see - where to begin... SELECT

RE: [PHP-DB] Update multiple records

2005-01-10 Thread Norland, Martin
> -Original Message- > From: Stuart Felenstein [mailto:[EMAIL PROTECTED] > Sent: Monday, January 10, 2005 10:40 AM > Subject: [PHP-DB] Update multiple records > > Having a problem here with updating multiple records in a table. [snip] Lets see - where to begin..

[PHP-DB] Update multiple records

2005-01-10 Thread Stuart Felenstein
Having a problem here with updating multiple records in a table. First the table is like such: +-+--+ | RecordID [int] | IndID [int] | +-+--+ There is no auto inc column. User has a record number and then can have multiple rows in tabl

Re: [PHP-DB] Update / Delete / Insert quandry

2005-01-06 Thread Stuart Felenstein
--- Andrew Kreps <[EMAIL PROTECTED]> wrote: > On Thu, 6 Jan 2005 07:28:32 -0800 (PST), Stuart > Felenstein > <[EMAIL PROTECTED]> wrote: > > > > The problem I'm having a hard time getting my > hands > > around are those areas where they can have > multiple > > entries. > > > > One of the tables

Re: [PHP-DB] Update / Delete / Insert quandry

2005-01-06 Thread Andrew Kreps
On Thu, 6 Jan 2005 07:28:32 -0800 (PST), Stuart Felenstein <[EMAIL PROTECTED]> wrote: > > The problem I'm having a hard time getting my hands > around are those areas where they can have multiple > entries. > > One of the tables allows for a user to enter up to 5 > choices. The table would look l

[PHP-DB] Update / Delete / Insert quandry

2005-01-06 Thread Stuart Felenstein
I am working on "update" areas for my end users. This is where they can go in and update and / or edit information in their profile. The problem I'm having a hard time getting my hands around are those areas where they can have multiple entries. One of the tables allows for a user to enter up

[PHP-DB] Update keeps failing with php/sqlite

2004-12-27 Thread Peter Jay Salzman
Hi all, I made a toy database. Two tables are "students" (a collection of student info) and "message" (private messages I want individual students to read). The "message" table is indexed by a student's social security number. student last, first, ssn, address, city, state, zip, email messag

Re: [PHP-DB] Update multiple tables

2004-08-26 Thread John Holmes
From: "Khalid Judeh" <[EMAIL PROTECTED]> I have a script that make changes to the database in more than one sql statement, as i need to update more than one table at the same time, I want to know if there is a method where all of those changes are committed, or rolled back if some error occured(let

Re: [PHP-DB] Update multiple tables

2004-08-25 Thread Ramil Sagum
On Wed, 25 Aug 2004 22:08:03 -0700 (PDT), Khalid Judeh <[EMAIL PROTECTED]> wrote: > Hello, > I have a script that make changes to the database in more than one sql statement, as > i need to update more than one table at the same time, I want to know if there is a > method where all of those chang

[PHP-DB] Update multiple tables

2004-08-25 Thread Khalid Judeh
Hello, I have a script that make changes to the database in more than one sql statement, as i need to update more than one table at the same time, I want to know if there is a method where all of those changes are committed, or rolled back if some error occured(lets say in the last sql statement

RE: [PHP-DB] Update data problem

2004-06-23 Thread Justin.Baiocchi
sold"]; print ""; print $row["income_in"]; print ""; print $row["income_out"]; print "\n"; } print "\n"; ?> Please enter closing details; Closed Date: Option Close

Re: [PHP-DB] Update data problem

2004-06-23 Thread Sam Chill
Justin, Is the code you posted all of the code or just a small snippet? You don't appear to be setting $C or $G. Could you post a larger code dump please? -Sam -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

RE: [PHP-DB] Update data problem

2004-06-23 Thread Justin.Baiocchi
: Thursday, 24 June 2004 2:55 PM To: [EMAIL PROTECTED] Subject: Re: [PHP-DB] Update data problem $E= "$C*$G"; Should be: $E = $C * $G; Never use quotation marks when doing math. Quotation marks are used for strings. Hope that helps. -- PHP Database Mailing List (http://www.php.net/) To u

Re: [PHP-DB] Update data problem

2004-06-23 Thread Sam Chill
$E= "$C*$G"; Should be: $E = $C * $G; Never use quotation marks when doing math. Quotation marks are used for strings. Hope that helps. -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP-DB] Update data problem

2004-06-23 Thread Justin.Baiocchi
Hi there, I hoped someone might be able to tell me why this is not working. I have a form that updates the table 'media' with the 3 values below, that and some other variables are the only data in the table. That works nicely. I then want to update one of the other columns ($E) based on the

Re: [PHP-DB] Update Statement

2004-02-18 Thread Ng Hwee Hwee
hwee - Original Message - From: "Ricardo Lopes" <[EMAIL PROTECTED]> To: "Ng Hwee Hwee" <[EMAIL PROTECTED]> Cc: "PHP DB" <[EMAIL PROTECTED]> Sent: Wednesday, February 18, 2004 5:41 PM Subject: Re: [PHP-DB] Update Statement > you could

Re: [PHP-DB] Update Statement

2004-02-18 Thread Ricardo Lopes
PROTECTED]> To: "DBList" <[EMAIL PROTECTED]> Sent: Wednesday, February 18, 2004 2:14 AM Subject: [PHP-DB] Update Statement hi all, I would like to do the following: update Table1, Table2 set Table1.field1 = Table2.field2 where Table1.no = Table2.no however, i found that multip

[PHP-DB] Update Statement

2004-02-17 Thread Ng Hwee Hwee
hi all, I would like to do the following: update Table1, Table2 set Table1.field1 = Table2.field2 where Table1.no = Table2.no however, i found that multiple updates can only work for MySQL version 4.0.4 but mine is 3.23.54... can anyone enlighten me on how I can achieve the same results with th

RE: [PHP-DB] Update problems

2004-01-20 Thread Paul Miller
x27;FWO', Grp='IIM' WHERE ZNum='112763'"; - Paul -Original Message- From: Peter Lovatt [mailto:[EMAIL PROTECTED] Sent: Tuesday, January 20, 2004 5:17 PM To: Kermit Short; [EMAIL PROTECTED] Subject: RE: [PHP-DB] Update problems you need quote

RE: [PHP-DB] Update problems

2004-01-20 Thread Peter Lovatt
you need quotes around the name FirstName="$fname" otherwise it takes the value of $fname to be aa field name HTH Peter -Original Message- From: Kermit Short [mailto:[EMAIL PROTECTED] Sent: 20 January 2004 22:28 To: [EMAIL PROTECTED] Subject: [PHP-DB] Update problems

[PHP-DB] Update problems

2004-01-20 Thread Kermit Short
I'm trying to update a record in a MSSQL database. When I execute the following code on an IIS5 webserver, I get an error message that says: PHP Warning: odbc_do(): SQL error: [Microsoft][ODBC SQL Server Driver][SQL Server]Invalid column name 'Tom'., SQL state S0022 in SQLExecDirect in E:\web\php

RE: [PHP-DB] Update Query

2003-10-29 Thread Hutchins, Richard
be a push in the right direction (I hope). Hope this helps. Rich > -Original Message- > From: Aaron Bryer [mailto:[EMAIL PROTECTED] > Sent: Wednesday, October 29, 2003 3:18 PM > To: [EMAIL PROTECTED] > Subject: RE: [PHP-DB] Update Query > > > I did that below is th

RE: [PHP-DB] Update Query

2003-10-29 Thread Aaron Bryer
al Message- From: Hutchins, Richard [mailto:[EMAIL PROTECTED] Sent: Wednesday, October 29, 2003 3:07 PM To: '[EMAIL PROTECTED]'; [EMAIL PROTECTED] Subject: RE: [PHP-DB] Update Query How do you know it failed? What is the mysql_error() returning to you? I'd also recommend you

RE: [PHP-DB] Update Query

2003-10-29 Thread Hutchins, Richard
--Original Message- > From: Aaron Bryer [mailto:[EMAIL PROTECTED] > Sent: Wednesday, October 29, 2003 3:02 PM > To: [EMAIL PROTECTED] > Subject: [PHP-DB] Update Query > > > > Hello, I ma new to the list and looking for some help with > the following > query. > >

[PHP-DB] Update Query

2003-10-29 Thread Aaron Bryer
Hello, I ma new to the list and looking for some help with the following query. insert into Temp (CompId) SELECT distinct(company_id) from Associations where product_id=9; When I exe that statement directly on the mysql command line It exe's with no problem. However when I exe that through php $

Re: [PHP-DB] update db with variables

2003-09-24 Thread Robbie Staufer
Thanks to all. Single quotes around '$value' did the trick. Robbie CPT John W. Holmes wrote: From: "Robbie Staufer" <[EMAIL PROTECTED]> I'm writing an application that will display the contents of a db in the browser, including the db-assigned id number. The user can then enter the id numb

Re: [PHP-DB] update db with variables

2003-09-24 Thread Ignatius Reilly
--- Original Message - From: "Robbie Staufer" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Wednesday, September 24, 2003 5:20 PM Subject: [PHP-DB] update db with variables > Hi, > > I'm writing an application that will display the contents of a db in

Re: [PHP-DB] update db with variables

2003-09-24 Thread CPT John W. Holmes
From: "Robbie Staufer" <[EMAIL PROTECTED]> > I'm writing an application that will display the contents of a db in the > browser, including the db-assigned id number. The user can then enter > the id number in a form and the browser will display the record > corresponding to that id number, with t

RE: [PHP-DB] update db with variables

2003-09-24 Thread Griffiths, Daniel
put some single quotes around $value in your SQL statement. -Original Message- From: Robbie Staufer [mailto:[EMAIL PROTECTED] Sent: 24 September 2003 16:21 To: [EMAIL PROTECTED] Subject: [PHP-DB] update db with variables Hi, I'm writing an application that will display the conten

[PHP-DB] update db with variables

2003-09-24 Thread Robbie Staufer
Hi, I'm writing an application that will display the contents of a db in the browser, including the db-assigned id number. The user can then enter the id number in a form and the browser will display the record corresponding to that id number, with the data in editable text fields. The user e

RE: [PHP-DB] UPDATE part of a column

2003-09-23 Thread Jacob A. van Zanen
As a separate issue, I would consider seperating the address field into it's individual parts Street,area,city etc.. All different fields -Original Message- From: Shaun [mailto:[EMAIL PROTECTED] Sent: Tuesday, September 23, 2003 2:03 PM To: [EMAIL PROTECTED] Subject: [PHP-DB] U

Re: [PHP-DB] UPDATE part of a column

2003-09-23 Thread mike karthauser
on 23/9/03 1:03 pm, Shaun at [EMAIL PROTECTED] wrote: > 1. How can I clean the table, so for example changing: > Ashfield Business Centre The Idlewells Precinct > Sutton-in-Ashfield > to: > Ashfield Business Centre, The Idlewells Precinct, Sutton-in-Ashfield, > > 2, Is there a way to make s

[PHP-DB] UPDATE part of a column

2003-09-23 Thread Shaun
Hi, I have a column in my table called address. When users add an address with a textarea they sometimes press return for a new line and this seems to be putting line breaks into the database, so I have 2 questions: 1. How can I clean the table, so for example changing: Ashfield Business Cent

[PHP-DB] UPDATE Query

2003-09-12 Thread Shaun
Hi, I have (amogst others) three tables in my database named Bookings, User, and Representative. A User and a Representative are different types of user, however I now want to merge these tables into one - User. When a Booking is made, the User_ID and the Rep_ID are stored in the Booking table. I

Re: Re: [PHP-DB] UPDATE query

2003-07-14 Thread CPT John W. Holmes
ED]> Sent: Monday, July 14, 2003 2:32 PM Subject: Re: Re: [PHP-DB] UPDATE query > > > -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DB] UPDATE query

2003-07-14 Thread CPT John W. Holmes
> $query1 = "UPDATE news,autori SET > news.titolo='$titolo', news.testo='$testo', > news.data='$data', news.nome='$nome', > autori.mail='$mail' WHERE news.nome = > autori.nome AND id='$id'"; You can't do an update across tables the last time I checked. Even if it's possible in newer versions, usin

[PHP-DB] UPDATE query

2003-07-14 Thread Marco Mastrorilli
i'm new in studing php/mysql so HELP ME! :) thx the query doesn't flow... What's wrong in this code?! in the DB there are 2 tables, here you are the queries to create them: -table autori: CREATE TABLE autori ( nome varchar(50) NOT NULL default '', mail varchar(50) default NULL, PRIM

RE: [PHP-DB] Update MD5 field

2003-03-04 Thread Beverly Steiner
Daniela, Why do you want to keep a calculated field inside your database? -- Beverly Steiner [EMAIL PROTECTED] -Original Message- From: Dani Matielo [mailto:[EMAIL PROTECTED] Sent: Monday, March 03, 2003 10:18 PM To: [EMAIL PROTECTED] Subject: [PHP-DB] Update MD5

[PHP-DB] Update MD5 field

2003-03-03 Thread Dani Matielo
Hello, everybody my problem is the following: I just imported a csv file to a MySQL database that contains name and email fields. It has about 9k lines on it and I need a new field that orinally didn't exist called "code" thats suposed to be MD5(name.email) I know how to do this for new data, bu

Re: [PHP-DB] Update errors

2003-02-27 Thread Jason Wong
On Saturday 01 March 2003 14:27, Alawi shekh albaity wrote: > What wrong with this SQL > $SQLSTATEMENT["UPDATE_CAT"] = " > UPDATE cats SET > cat_name = '$cat_name', Remove that trailing comma. > WHERE cat_id = $catidforedit > "; > Error no : 1064 > Details : > > You have an error in your

RE: [PHP-DB] Update errors

2003-02-27 Thread Gary . Every
awi shekh albaity [mailto:[EMAIL PROTECTED] Sent: Saturday, March 01, 2003 12:27 AM To: [EMAIL PROTECTED] Subject: [PHP-DB] Update errors What wrong with this SQL $SQLSTATEMENT["UPDATE_CAT"] = " UPDATE cats SET cat_name = '$cat_name', WHERE cat_id = $catidforedit &qu

RE: [PHP-DB] Update errors

2003-02-27 Thread Hutchins, Richard
Remove the comma at the end of this line: > cat_name = '$cat_name',//remove this comma > -Original Message- > From: Alawi shekh albaity [mailto:[EMAIL PROTECTED] > Sent: Saturday, March 01, 2003 1:27 AM > To: [EMAIL PROTECTED] > Subject: [PHP-DB] Update er

[PHP-DB] Update errors

2003-02-27 Thread Alawi shekh albaity
What wrong with this SQL $SQLSTATEMENT["UPDATE_CAT"] = " UPDATE cats SET cat_name = '$cat_name', WHERE cat_id = $catidforedit "; Error no : 1064 Details : You have an error in your SQL syntax near 'WHERE cat_id = 2 ' at line 4 Db : mysql -- PHP Database Mailing List (http://www.php.ne

Re: [PHP-DB] UPDATE doesn't work

2003-02-05 Thread Le Hoang
, February 05, 2003 1:44 PM Subject: Re: [PHP-DB] UPDATE doesn't work > On Wednesday 05 February 2003 12:50, Le Hoang wrote: > > > > > // Add 1 view to the view column > > > > $v = $row[view]; > > $vplus = $v+1; > > $view = mysq

Re: [PHP-DB] UPDATE doesn't work

2003-02-04 Thread Jason Wong
On Wednesday 05 February 2003 12:50, Le Hoang wrote: > > // Add 1 view to the view column > > $v = $row[view]; > $vplus = $v+1; > $view = mysql_query("update photoshop_tutorial where id=$id set > view=$vplus"); // Problem here! You should ALWAYS check the result of a call to mysql_query(): if

[PHP-DB] UPDATE doesn't work

2003-02-04 Thread Le Hoang
Hello all, I'm a graphic designer making a site for giving tutorials, but since i'm just a newbie in coding, tons of problems have fallen on me. This is my photoshop_tutorial table structure id int not null auto_increment, title varchar(255) not null, author varchar(55) not null, descr

Re: [PHP-DB] update

2003-02-04 Thread Doug Thompson
;[EMAIL PROTECTED]> >To: "Ike Austin" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> >Sent: Tuesday, February 04, 2003 2:17 PM >Subject: Re: [PHP-DB] update > > >> UPDATE is for changing values in existing rows. It appears you want to >> add new inf

Re: [PHP-DB] update

2003-02-04 Thread Ignatius Reilly
To: "Ike Austin" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> Sent: Tuesday, February 04, 2003 2:17 PM Subject: Re: [PHP-DB] update > UPDATE is for changing values in existing rows. It appears you want to > add new information. Use INSERT. > > $query= "

Re: [PHP-DB] update

2003-02-04 Thread Doug Thompson
UPDATE is for changing values in existing rows. It appears you want to add new information. Use INSERT. $query= "INSERT tablename SET (username, email, location) VALUES( $username, $email, $location)"; Note that a WHERE condition is incorrect for INSERT. Your UPDATE syntax is not correct either

[PHP-DB] update

2003-02-04 Thread Ike Austin
Hello, Newbie question. And can the same SQL portion of the code be written something like... query= "UPDATE taablename SET (username, email, location) VALUEs( $username, $email, $location)"; Any reason why this Update command would not execute? // BUILD AND EXECUTE QUERY TO SAVE USER INFO INTO

Re: [PHP-DB] - Update help

2003-01-31 Thread Jason Wong
On Friday 31 January 2003 15:31, nikos wrote: > I've download some patches for PHP 4.0.6. and I dont know how to use it. > For example rfc1867.c.diff-4.0.6 file how can I "run" it and do the update? > I have PH 7,2 Linux and Apache 1,32 > Thank you If there's no compelling reason for you to be st

[PHP-DB] - Update help

2003-01-30 Thread nikos
Hello list I've download some patches for PHP 4.0.6. and I dont know how to use it. For example rfc1867.c.diff-4.0.6 file how can I "run" it and do the update? I have PH 7,2 Linux and Apache 1,32 Thank you

Re: [PHP-DB] UPDATE tbl problem...

2002-12-14 Thread Jason Wong
On Sunday 15 December 2002 09:24, Hartleigh Burton wrote: > Hi, > > I am having a small problem when it comes to updating some tables that I > have. tblmembers and tbloptions are both linked together with the exact > same userid #. here is the code i have been using... > > mys

[PHP-DB] UPDATE tbl problem...

2002-12-14 Thread Hartleigh Burton
Hi, I am having a small problem when it comes to updating some tables that I have. tblmembers and tbloptions are both linked together with the exact same userid #. here is the code i have been using... mysql_query("UPDATE tbloptions SET strColorPref='$tmpColorPref' strText

RE: [PHP-DB] Update Query Help...

2002-12-11 Thread Ford, Mike [LSS]
> -Original Message- > From: NIPP, SCOTT V (SBCSI) [mailto:[EMAIL PROTECTED]] > Sent: 10 December 2002 20:02 > > I have definitely isolated the problem. If I change > the column name > that the match is being performed on from 'id-sys' to > 'id_sys' I can execute > the query witho

Re: [PHP-DB] Update Query Help...

2002-12-10 Thread 1LT John W. Holmes
> I have definitely isolated the problem. If I change the column name > that the match is being performed on from 'id-sys' to 'id_sys' I can execute > the query without having to worry about quoting the column name and > everything works. I think that I am just going to leave the column name > ch

RE: [PHP-DB] Update Query Help...

2002-12-10 Thread NIPP, SCOTT V (SBCSI)
, SCOTT V (SBCSI); '1LT John W. Holmes'; [EMAIL PROTECTED] Subject: Re: [PHP-DB] Update Query Help... SCOTT, The list's crystal ball filter is down for maintenance. Show us the tbl schema and the debug print of $update. Then we won't be firing blind! =dn > I understand th

Re: [PHP-DB] Update Query Help...

2002-12-10 Thread DL Neil
> To: NIPP, SCOTT V (SBCSI); [EMAIL PROTECTED] > Subject: Re: [PHP-DB] Update Query Help... > > > > $tmp = $_POST['sbcuid']."-".$_POST['system'][$a]; > > $update = "UPDATE accounts SET atime='NOW()' WHERE > > \"id-sys\&q

RE: [PHP-DB] Update Query Help...

2002-12-10 Thread NIPP, SCOTT V (SBCSI)
From: 1LT John W. Holmes [mailto:[EMAIL PROTECTED]] Sent: Tuesday, December 10, 2002 1:45 PM To: NIPP, SCOTT V (SBCSI); [EMAIL PROTECTED] Subject: Re: [PHP-DB] Update Query Help... > $tmp = $_POST['sbcuid']."-".$_POST['system'][$a]; > $update = "UPDATE ac

Re: [PHP-DB] Update Query Help...

2002-12-10 Thread DL Neil
SCOTT, > I am attempting to UPDATE a table and I have having absolutely ZERO > success. Here is the query: > $tmp = $_POST['sbcuid']."-".$_POST['system'][$a]; > $update = "UPDATE accounts SET atime='NOW()' WHERE > \"id-sys\"='".$tmp."'"; > echo $update; > $result1 = mysql_query($update, $Prod) or

RE: [PHP-DB] Update Query Help...

2002-12-10 Thread SELPH,JASON (HP-Richardson,ex1)
le. Cheers Jason -Original Message- From: NIPP, SCOTT V (SBCSI) [mailto:[EMAIL PROTECTED]] Sent: Tuesday, December 10, 2002 1:35 PM To: '[EMAIL PROTECTED]' Subject: [PHP-DB] Update Query Help... I am attempting to UPDATE a table and I have having absolutely ZERO success.

Re: [PHP-DB] Update Query Help...

2002-12-10 Thread 1LT John W. Holmes
> $tmp = $_POST['sbcuid']."-".$_POST['system'][$a]; > $update = "UPDATE accounts SET atime='NOW()' WHERE > \"id-sys\"='".$tmp."'"; > echo $update; > $result1 = mysql_query($update, $Prod) or die(mysql_error()); > echo mysql_affected_rows(); Try: $update = "UPDATE accounts SET atime=NOW() WHERE id

[PHP-DB] Update Query Help...

2002-12-10 Thread NIPP, SCOTT V (SBCSI)
I am attempting to UPDATE a table and I have having absolutely ZERO success. Here is the query: $tmp = $_POST['sbcuid']."-".$_POST['system'][$a]; $update = "UPDATE accounts SET atime='NOW()' WHERE \"id-sys\"='".$tmp."'"; echo $update; $result1 = mysql_query

[PHP-DB] UPDATE mySQL database with IF condition

2002-11-21 Thread Ravi Ramroop
Hi.. I'm having some problem with an if condition when I'm trying to insert data into a mysql table.. the script works fine with no parse errors..but the table doesn't get updated like I want it to be.. and i'm almost certain that the code is correct... Here is part of the script.. I have a form w

RE: [PHP-DB] update and join?

2002-10-10 Thread John W. Holmes
> Quick questionis it possible to do an update query w/ a join yet? If > not, what is your preferred method? Would you take care of it on the PHP > side? Probably depends on your database, but MySQL doesn't support it. I think MySQL 4.0 might. > I need to update a table w/ data from another

  1   2   >