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
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.
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
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
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
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 ' ' ;
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
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++)
{
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
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
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.
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/
--
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
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
14 matches
Mail list logo