Questions about the MySQL, PostgreSQL, and most other databases, as well as using it with PHP can be asked here.
Moderator: General Moderators
anjanesh
DevNet Resident
Posts: 1679 Joined: Sat Dec 06, 2003 9:52 pm
Location: Mumbai, India
Post
by anjanesh » Thu Mar 24, 2005 6:14 am
Is it possible to store a value in MySQL for later use ?
Pure SQL - no PHP coding.
Code: Select all
a=5;
INSERT INTO `table1` VALUES (a,'test');
Anyway to do this ?
Thanks.
Last edited by
anjanesh on Sat Mar 26, 2005 10:06 pm, edited 1 time in total.
CoderGoblin
DevNet Resident
Posts: 1425 Joined: Tue Mar 16, 2004 10:03 am
Location: Aachen, Germany
Post
by CoderGoblin » Thu Mar 24, 2005 6:40 am
Normally you would use sessions or some form of general purpose table.
anjanesh
DevNet Resident
Posts: 1679 Joined: Sat Dec 06, 2003 9:52 pm
Location: Mumbai, India
Post
by anjanesh » Fri Mar 25, 2005 4:32 am
Need to do this in MySQL console or phpMyAdmin or any other MySQL interface only - no php.
sessions in SQL ? Never heard of it.
phpScott
DevNet Resident
Posts: 1206 Joined: Wed Oct 09, 2002 6:51 pm
Location: Keele, U.K.
Post
by phpScott » Fri Mar 25, 2005 5:47 am
You can try temporary tables in mysql, here is the link.
I haven't used them before so I'm not sure what the limitations are or how long the last, but it might be a start
temporary tables
anjanesh
DevNet Resident
Posts: 1679 Joined: Sat Dec 06, 2003 9:52 pm
Location: Mumbai, India
Post
by anjanesh » Sat Mar 26, 2005 10:05 pm
Wow. Thanks magicrobotmonkey. Dont know how I missed this.
This is good - its there since ver 3 ! Thought only 5 would have this.
Thanks.