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
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 ;
DELETE FROM table1 WHE
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
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
I am trying to fetch data through this code:
My code:
for($i=0;$i' ;
echo '' ;
echo ' ' ;
echo ' Store
name:' ;
echo ' ' ;
echo '
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
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);
>
> 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
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"
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.
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
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
> 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
14 matches
Mail list logo