Simple way (without details)
In a MySql table is it possible to use the value of a field as part of the default value of another field?
^^^
OK, here is exactly what I'm looking to do:
1) `my_link` is a new field added to `mybb_forums` table
2) A sample entry is,
so when this field (from the row with fid=2) is retrieved, there is a link created to the forum w/ fid=2.**
3a) What is the best (automated) way to create the entries into this field?
3b) I know how to do it with php, but I'm looking for something more "direct."
Edit:
These next sections (below) "probably will not work",
http://dev.mysql.com/doc/refman/5.0/en/d...http://dev.mysql.com/doc/refman/5.0/en/data-type-def
is there a way to do something similar?
3c) If the default value of the field is set to (for example),
(or something similar)
3d) Will MySql 'retrieve' this value %fid% (or whatever format will work), from the (newly created) 'fid' field and use that value in the `linkto` field (in the "default sample code?")
- Like in an Excel spreadsheet, how do I "grab" a value from a different column in the same row?
Searching Google for "MySql variable" mostly gives results related to variables used in queries, and / or user defined "session" variables.
A) How can I use a variable (based on a field value)
directly in a MySql table?
and
B) Can the same method work as part of a default value?
(Probably not)
Thank you very much
...
..
.
**ps. I do know:
Normally this code (for example)
could easily be created "on the fly", but I have a situation where it would be really useful to pull the above example straight out of the db.