Автор Тема: ssi  (Прочитано 3182 раз)

0 Пользователей и 1 Гость просматривают эту тему.

Оффлайн alesh

  • Завсегдатай
  • Пользователь
  • **
  • Сообщений: 97
  • +0/-0
  • 0
    • Просмотр профиля
    • http://www.alesh.ru
ssi
« : 21 Мая 2002, 23:32:41 »
Гы. Есть вопрос.
Я хочу создать на ссай коннект к Mysql и выводить от туда данные. Наверняка это возможно . А как?

Оффлайн NAS

  • Неопытный юзер
  • Администратор
  • Ветеран
  • *****
  • Сообщений: 2951
  • +1/-0
  • 1
    • Просмотр профиля
    • http://nhouse.ru
ssi
« Ответ #1 : 21 Мая 2002, 23:49:50 »
никак.

Оффлайн Dm

  • Модератор
  • Глобальный модератор
  • Ветеран
  • *****
  • Сообщений: 1263
  • +0/-0
  • 0
    • Просмотр профиля
    • http://
ssi
« Ответ #2 : 22 Мая 2002, 01:37:40 »
alesh
только если ты в ssi включишь еще что-то, что работает с бд.

NAS прав, напрямую - нельзя.
с уважением,
магистр белой магии.

Оффлайн alesh

  • Завсегдатай
  • Пользователь
  • **
  • Сообщений: 97
  • +0/-0
  • 0
    • Просмотр профиля
    • http://www.alesh.ru
ssi
« Ответ #3 : 22 Мая 2002, 12:05:33 »
гм. плохо :(
Спасибо :)

Оффлайн ЖеньКа

  • Свободная статУя
  • Глобальный модератор
  • Ветеран
  • *****
  • Сообщений: 1013
  • +0/-0
  • 2
    • Просмотр профиля
вот такую вот фигню откопала :)
« Ответ #4 : 22 Мая 2002, 23:04:39 »
\'odbc\' tag
Notice! Due to some problems with the MS ODBC drivers we are phasing out the support of the SSI+ ODBC tags. To impliment ODBC with WebQuest we are using CScript with our WQODBC.DLL. For more information on CScript and ODBC, check out the Guestbook tutorial. The SSI+ ODBC tags will not exist in WebQuest 3.0.

The odbc tag provides for querying and updating odbc databases. Four variables are defined for the odbc token; \'debug\', \'connect\', \'statement\', and \'format\'.

\'debug\' variable
The debug variable is used to set the SSI+ engine into debug mode. Debug mode provides diagnostics of a highly detailed nature from both the SSI engine itself and the local ODBC engine. Debug messages appear on the returned HTML document at the position at which the errors occur. The debug variable should be used only for development and must be removed before production. When the debug variable is present a warning message will appear indicating it\'s presence, this message is benign and will not affect any other aspect of the SSI+ engine. The format of the debug variable is : \'debug=\'""\' where;

is any string and is reserved for future use.
\'connect\' variable
The connect variable is used to connect to a pre-existing odbc data source, to allow for subsequent statement tag operations on that data source. The format of the connect variable is \'connect="\'\',\'\',\'\'"\'where ;

is the name odbc data source as defined on the local system in the odbc configuration utility. CAUTION! the account under which the server is run must be granted permission to access the data source.
is the name which to log into the data source.
is the password with which to access the data source.
Example. To connect to a data source called \'odbcsht\' as user \'dufus\' and password \'dorkboy\', one would use the following statement: .

\'statement\' variable
The statement variable is used to submit a Transact SQL statement to the odbc data source. The format of a statement variable is as follows: \'statement="\'\'"\',where:

is any Transact SQL statement as defined in odbc and SQL reference text and help files.
Example. Suppose one wanted to query the \'CUSTOMERS\' table from the above connected \'odbcsht\' database to return all rows and display each row on a separate line. One may use the following sequence of statements:

Connect to the database with a connect token as described above.
Setup the output format with a statement token as described below.
Execute the query:
Each row of the database will the be inserted into the HTML page per the format statement as demonstrated below.
\'format\' variable
The format variable is used to provide a template for the format of data that is returned from and odbc query. Use this variable to set up the appearance of data that will be returned from subsequent statement tag operations that return data from a database (i.e. the SQL statement \'SELECT\'). The format of the format variable is \'format="\'\'"\'where;

is a standard C language printf format string with the restriction of only allowing string (%s) insertions. The user is referred to any C language text for a description of this format. The number of instances of %s must be equal to the number of fields selected in a the subsequent SQL SELECT statement token.
Example. Suppose one wanted to query the \'CUSTOMERS\' table from the above connected \'odbcsht\' database to display the columns \'name\', \'age\', and \'viscosity\' with each row on a separate line. One may use the following sequence of statements:

Connect to the database with a connect token as described above.
Setup the output format: .
Execute the query with a statement token as described above.
Each row of the database will the be inserted into the HTML page per the format statement. For example if the database has 3 rows the HTML output would look something like this:
Customer\'s name is Conan, and he is 29 years old, he prefers a motor oil with SPF 15 viscosity
Customer\'s name is Kevin, and he is 45 years old, he prefers a motor oil with SPF 30 viscosity
Customer\'s name is Alan, and he is 43 years old, he prefers a motor oil with SPF 50 viscosity
Ну и что что ветер в голове зато мысли всегда свежие.

 

Sitemap 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28