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

[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 some condition; DELETE

[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 values

[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 `vendor` LIKE

[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;$imysql_num_rows($results);$i++) { $rows = mysql_fetch_array($results); echo 'div' ; echo 'div class=fieldrow' ; echo ' ' ;

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

2007-09-26 Thread Naintara
Try replacing this: echo ' input name=storename type=text maxlength=35 id=storename class=regForm disabled=disabled value=$rows[0]/input' ; With this: echo ' input name=storename type=text maxlength=35 id=storename class=regForm

[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 input name=storename type=text value=$var1; } Chris Carter wrote: I am trying to fetch data through this code: My code: for($i=0;$imysql_num_rows($results);$i++) {

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(input name=\input1\ type=\text\ value=$rows[0]); If what you want rendered in html should have quotes like so: input name=input1 type=text value=some value Double quote the value like so: echo(input

[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 - OR

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
snip echo(input name=\input1\ type=\text\ value=$rows[0]); Change to echoinput name=\input1\ type=\text\ value=\ . htmlspecialchars($rows[0], ENT_QUOTES) . \; So html characters like and won't be interpreted by the browser. -- Postgresql php tutorials http://www.designmagick.com/ --

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

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 values