variables in a database

C++, C#, Java, PHP, ect...
Post Reply
User avatar
Torniquet
Posts: 869
Joined: Sun Aug 02, 2009 6:18 am

variables in a database

Post by Torniquet »

is it possible to embed a variable name in a database field?

for example.

in your database you have.... 'something for $user to read'

and for it to return 'something for torniquet to read'
New Site Coming Soon! Stay tuned :D
Xaleph
Posts: 897
Joined: Mon Feb 07, 2011 2:55 am

Re: variables in a database

Post by Xaleph »

It`s possible, but not in that way. You cannot store variables in the database itself, however, you can construct a method to identify certain text strings and let the database find the corresponding items. Like in your example "let %user% read bladiebla book." You can also do something like: %user_name(39383)% , where, in the backend you write a function to get the user name with id 39383.
Post Reply

Return to “Coding”