$prolog_query = "car(X,'red')";
$rsrc = odbc_connect("DRIVER={Prolog ODBC Driver};
CommLinks=tcpip(Host=$db_host);
DatabaseName=$db_name;",$db_user,$db_pass);
$result = odbc_exec($rsrc,$prolog_query);
Is there anything out there like this?
Thanks,
Weston
While Prolog can store and query the data you want, it doesn't appear
you can access these capabilities from outside Prolog. Others here can
probably give a more definitive answer. What scripting language are you
using? Why not manage your data in a regular database like MS Access.
It's true it won't accept "car(x, 'red')" but you could you get the
same results with SELECT queries, couldn't you? What kind of data is
involved in your project?
>13 years after doing some academic stuff in Turbo Prolog, I'm looking
>at a potential project and realizing some aspects of it might be
>simplified by using Prolog as a database and query mechanism rather
>than a traditional SQL. However, I'm really not interested in writing
>the entire app in Prolog. What I'd rather do is pick a scripting
>language, and then make queries to a Prolog-server with an interface
>much like one frequently sees to the commonly used SQL databases. To
>use a perl/php-esque example, something that would enable a sequence
>like this if I were trying to find a car that were red in a db of
>prolog facts:
>
> $prolog_query = "car(X,'red')";
>
> $rsrc = odbc_connect("DRIVER={Prolog ODBC Driver};
>CommLinks=tcpip(Host=$db_host);
>DatabaseName=$db_name;",$db_user,$db_pass);
Check PrologBeans in SICStus Prolog
A.L.
Why not?...
A.L.
Thx for the correction.