[Gambas-user] Gambas Server Pages & mysql

Dimitris Anogiatis dosida at ...626...
Wed Apr 15 05:33:47 CEST 2009


Hey guys,

With the example below Gambas Server Pages were introduced.

My question is:
1) how would I achieve a connection to a mysql database or any database for
that matter?
2) where in the code below would I put the necessary statements?
3) if no direct reference to any database objects can be made is the
alternative, by lets say, using an external gambas module or some other
trick?

--8<--------------------------------------------------------------------------------------------------------------------------------------

#!/usr/bin/env gbw2
<%
DIM sEnv AS String
%>

<!-- Variable declaration must come before any HTML -->

<html>

<h2>CGI script environmental variables</h2>

<table border="1" cellspacing="0" cellpadding="2">

  <tr>
    <th align="left">Name</th>
    <th align="left">Value</th>
  </tr>

<% FOR EACH sEnv IN Application.Env %>
  <tr valign="top">
    <td><%= sEnv %></td>
    <td><%= Application.Env[sEnv] %> </td>
  </tr>
<% NEXT %>

</table>

</html>
--8<--------------------------------------------------------------------------------------------------------------------------------------

Thanks in advance

Regards
Dimitris



More information about the User mailing list