Re: [PHP-DB] What could be the right approach to get this data

2007-09-26 Thread Micah Stevens
Sessions use cookie unless you force the URL session ID. Once you do that, your options are pretty limited. You must pass some sort of identifier from page load to page load to track a session. This can either be via cookie (a preferred method) or through GET or POST variables. There is no othe

[PHP-DB] Delete one table and move data to another table

2007-09-26 Thread endro mei a.
I have a table1 it contents (3 column) : id int(11) name varchar(200) address varchar(255) I want to delete table1 and insert data to table2 it contents (5 column) : id name addres date_delete datetime who_delete varchar(50) Code on php and mysql ??? Anyone can help me. ==

Re: [PHP-DB] Delete one table and move data to another table

2007-09-26 Thread TG
You could use an INSERT/SELECT statement in MySQL: http://dev.mysql.com/doc/refman/4.1/en/insert-select.html Using the schema you outlined: INSERT INTO table2(name, address, date_deleted, who_delete) SELECT name, address, NOW(), 'whoever deleted' FROM table1 WHERE ; DELETE FROM table1 WHE

[PHP-DB] Inserting databasecontent within the same form

2007-09-26 Thread Ruprecht Helms
Hi, How can I overtake the fieldvalues of city and the first part of the phonenumber. It should read out the value of the zipfield and check them with the content of the table "ort". If there is found a recordset with the same plz the formfields city and the the field "vorwahl" should get the valu

[PHP-DB] mysql statement

2007-09-26 Thread Jas
I am looking for some advice on how to achieve something and so far have been unable to do what I am looking to do. Here is the query I am using: mysql> SELECT * -> FROM `orders` -> WHERE `ordernum` LIKE "35132" -> OR `price` LIKE "35132" -> OR `partnum` LIKE "35132" -> OR `ve

[PHP-DB] Data not fetching in the textfield.

2007-09-26 Thread Chris Carter
I am trying to fetch data through this code: My code: for($i=0;$i' ; echo '' ; echo ' ' ; echo ' Store name:' ; echo ' ' ; echo '

RE: [PHP-DB] Data not fetching in the textfield.

2007-09-26 Thread Naintara
Try replacing this: echo ' ' ; With this: echo ' ' ; -Original Message- From: Chris Carter [mailto:[EMAIL PROTECTED] Sent: Wednesday, September 26, 2007 10:04 PM To: php-db@lists.php.net Subject: [PHP-DB] Data not fetching in the te

[PHP-DB] Re: Data not fetching in the textfield.

2007-09-26 Thread Jas
You could always do something like: while( $x = myql_fetch_array( $results ) ) { list( $var1, $var2, $var3, ... ) = $x; echo ""; } Chris Carter wrote: > I am trying to fetch data through this code: > > My code: > for($i=0;$i { > $rows = mysql_fetch_array($results); >

RE: [PHP-DB] Data not fetching in the textfield.

2007-09-26 Thread Instruct ICC
> Date: Wed, 26 Sep 2007 09:33:40 -0700 > From: [EMAIL PROTECTED] > echo(" value=$rows[0]>"); If what you want rendered in html should have quotes like so: Double quote the value like so: echo(""); and escape $rows[0] in case it contains any double quotes thusly (or with

[PHP-DB] Re: mysql statement [SOLVED]

2007-09-26 Thread Jas
Got if figured out, needed a sub-select type of query: mysql> SELECT * -> FROM ( SELECT * FROM `orders` -> WHERE `group` = "groupname" ) -> AS orders UNION SELECT * FROM `orders` -> WHERE `ordernum` LIKE "35132" -> OR `price` LIKE "35132" -> OR `partnum` LIKE "35132"

Re: [PHP-DB] Re: mysql statement [SOLVED]

2007-09-26 Thread TG
Couple of little pointers. If you're doing the sub-select, then you don't need the "group like 'mac'" because you've already limited your query in the subselect to a specific groupname. The subselect is probably unnecessary since what you're doing is relatively simple and uses the same table.

Re: [PHP-DB] Data not fetching in the textfield.

2007-09-26 Thread Chris
echo(""); Change to echo"htmlspecialchars($rows[0], ENT_QUOTES) . "\">"; So html characters like > and < won't be interpreted by the browser. -- Postgresql & php tutorials http://www.designmagick.com/ -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.p

Re: [PHP-DB] Data not fetching in the textfield.

2007-09-26 Thread Niel Archer
Your variable value is not being inserted because you have used single quotes for the echo, not double quotes as the nabble example does. Special characters and variables are only interpreted in double quotes, they are treated literally in single quotes. -- Niel Archer -- PHP Database Mailing L

Re: [PHP-DB] Inserting databasecontent within the same form

2007-09-26 Thread Niel Archer
> How can I overtake the fieldvalues of city and the first part of the > phonenumber. It should read out the value of the zipfield and check them > with the content of the table "ort". If there is found a recordset with > the same plz the formfields city and the the field "vorwahl" should get > the