This is the new home of the egghelp.org community forum.
All data has been migrated (including user logins/passwords) to a new phpBB version.


For more information, see this announcement post. Click the X in the top right-corner of this box to dismiss this message.

mysql

Help for those learning Tcl or writing their own scripts.
Post Reply
M
MrBoss
Voice
Posts: 7
Joined: Sat Nov 21, 2009 6:34 am

mysql

Post by MrBoss »

how i can show my all infos registred in my db?
I can connect so I can't show all infos.
r
raider2k
Op
Posts: 140
Joined: Tue Jan 01, 2008 10:42 am

Post by raider2k »

using tcl or what is it you are asking for exactly?

either way - my advice is to look at existing tcl scripts how mysql is being called and mysql.org if needed for more information about mysql usage.
M
MrBoss
Voice
Posts: 7
Joined: Sat Nov 21, 2009 6:34 am

Tcl-Sql

Post by MrBoss »

How i can install the tcl-sql ?

I have try

Code: Select all

fenix:~/tcl-sql/tcl-sql# chmod +w Makefile 
fenix:~/tcl-sql/tcl-sql# make clean
Cleaned
fenix:~/tcl-sql/tcl-sql# make
g++ -c -I/usr/local/include -I/usr/include/mysql -I/usr/local/mysql/include -fPIC  -Wall -o obj/sql-mysql.o sql-mysql.cc
sql-mysql.cc:1:17: error: tcl.h: No such file or directory
In file included from sql-mysql.cc:2:
sql-mysql.h:2:19: error: mysql.h: No such file or directory
In file included from sql-mysql.h:3,
                 from sql-mysql.cc:2:
sql-interface.h: In member function ‘virtual Sql_row* Sql_interface::fetchrow(int)’:
sql-interface.h:49: error: ‘NULL’ was not declared in this scope
sql-interface.h: In member function ‘virtual char* Sql_interface::getErrorMsg()’:
sql-interface.h:56: error: ‘NULL’ was not declared in this scope
sql-interface.h: In member function ‘char* Sql_row::getColumn(int)’:
sql-interface.h:81: error: ‘NULL’ was not declared in this scope
In file included from sql-mysql.cc:2:
sql-mysql.h: At global scope:
sql-mysql.h:9: error: ‘MYSQL’ does not name a type
sql-mysql.h:10: error: ISO C++ forbids declaration of ‘MYSQL_RES’ with no type
sql-mysql.h:10: error: expected ‘;’ before ‘*’ token
sql-mysql.h:11: error: ‘MYSQL_ROW’ does not name a type
sql-mysql.cc: In constructor ‘Sql_mysql::Sql_mysql()’:
sql-mysql.cc:7: error: ‘results’ was not declared in this scope
sql-mysql.cc:7: error: ‘NULL’ was not declared in this scope
sql-mysql.cc:9: error: ‘NULL’ was not declared in this scope
sql-mysql.cc: In constructor ‘Sql_mysql::Sql_mysql(int, char**)’:
sql-mysql.cc:15: error: ‘results’ was not declared in this scope
sql-mysql.cc:15: error: ‘NULL’ was not declared in this scope
sql-mysql.cc: In member function ‘virtual char* Sql_mysql::getErrorMsg()’:
sql-mysql.cc:23: error: ‘mysql’ was not declared in this scope
sql-mysql.cc:23: error: ‘mysql_error’ was not declared in this scope
sql-mysql.cc: In member function ‘virtual int Sql_mysql::connect(int, char**)’:
sql-mysql.cc:35: error: ‘NULL’ was not declared in this scope
sql-mysql.cc:43: error: ‘mysql’ was not declared in this scope
sql-mysql.cc:43: error: ‘mysql_connect’ was not declared in this scope
sql-mysql.cc: In member function ‘virtual int Sql_mysql::selectdb(char*)’:
sql-mysql.cc:56: error: ‘mysql’ was not declared in this scope
sql-mysql.cc:56: error: ‘mysql_select_db’ was not declared in this sc
sql-mysql.cc: In member function ‘virtual int Sql_mysql::exec(char*)’:
sql-mysql.cc:66: error: ‘mysql’ was not declared in this scope
sql-mysql.cc:66: error: ‘mysql_query’ was not declared in this scope
sql-mysql.cc: At global scope:
sql-mysql.cc:74: error: default argument given for parameter 1 of ‘int Sql_mysql::numRows(int)’
sql-mysql.h:29: error: after previous specification in ‘virtual int Sql_mysql::numRows(int)’
sql-mysql.cc: In member function ‘virtual int Sql_mysql::numRows(int)’:
sql-mysql.cc:75: error: ‘results’ was not declared in this scope
sql-mysql.cc:76: error: ‘results’ was not declared in this scope
sql-mysql.cc:76: error: ‘mysql_num_rows’ was not declared in this scope
sql-mysql.cc: In member function ‘int Sql_mysql::getFreeResultHandle()’:
sql-mysql.cc:83: error: ‘results’ was not declared in this scope
sql-mysql.cc: In member function ‘virtual int Sql_mysql::query(char*)’:
sql-mysql.cc:96: error: ‘MYSQL_RES’ was not declared in this scope
sql-mysql.cc:96: error: ‘res’ was not declared in this scope
sql-mysql.cc:99: error: ‘sprintf’ was not declared in this scope
sql-mysql.cc:103: error: ‘mysql’ was not declared in this scope
sql-mysql.cc:103: error: ‘mysql_query’ was not declared in this scope
sql-mysql.cc:104: error: ‘mysql’ was not declared in this scope
sql-mysql.cc:104: error: ‘mysql_store_result’ was not declared in this scope
sql-mysql.cc:106: error: ‘results’ was not declared in this scope
sql-mysql.cc: At global scope:
sql-mysql.cc:112: error: default argument given for parameter 1 of ‘void Sql_mysql::endquery(int)’
sql-mysql.h:30: error: after previous specification in ‘virtual void Sql_mysql::endquery(int)’
sql-mysql.cc: In member function ‘virtual void Sql_mysql::endquery(int)’:
sql-mysql.cc:113: error: ‘results’ was not declared in this scope
sql-mysql.cc:114: error: ‘results’ was not declared in this scope
sql-mysql.cc:114: error: ‘mysql_free_result’ was not declared in this scope
sql-mysql.cc:115: error: ‘NULL’ was not declared in this scope
sql-mysql.cc: At global scope:
sql-mysql.cc:123: error: default argument given for parameter 1 of ‘Sql_row* Sql_mysql::fetchrow(int)’
sql-mysql.h:31: error: after previous specification in ‘virtual Sql_row* Sql_mysql::fetchrow(int)’
sql-mysql.cc: In member function ‘virtual Sql_row* Sql_mysql::fetchrow(int)’:
sql-mysql.cc:125: error: ‘results’ was not declared in this scope
sql-mysql.cc:126: error: ‘sprintf’ was not declared in this scope
sql-mysql.cc:127: error: ‘NULL’ was not declared in this scope
sql-mysql.cc:130: error: ‘MYSQL_ROW’ was not declared in this scope
sql-mysql.cc:131: error: ‘results’ was not declared in this scope
sql-mysql.cc:132: error: ‘row’ was not declared in this scope
sql-mysql.cc:132: error: ‘mysql_fetch_row’ was not declared in this scope
sql-mysql.cc:133: error: ‘NULL’ was not declared in this scope
sql-mysql.cc:135: error: ‘mysql_num_fields’ was not declared in this scope
sql-mysql.cc: In destructor ‘virtual Sql_mysql::~Sql_mysql()’:
sql-mysql.cc:145: error: ‘results’ was not declared in this scope
sql-mysql.cc:147: error: ‘mysql’ was not declared in this scope
sql-mysql.cc:147: error: ‘mysql_close’ was not declared in this scope
make: *** [obj/sql-mysql.o] Error 1
r
raider2k
Op
Posts: 140
Joined: Tue Jan 01, 2008 10:42 am

Post by raider2k »

dont know what tcl-sql is supposed to be, what you need is called mysqltcl
and please try to use proper english in here as well.
M
MrBoss
Voice
Posts: 7
Joined: Sat Nov 21, 2009 6:34 am

Post by MrBoss »

you use in your tcls the mysqltcl?
User avatar
caesar
Mint Rubber
Posts: 3778
Joined: Sun Oct 14, 2001 8:00 pm
Location: Mint Factory

Post by caesar »

Mysqltcl is a simple API for Mysql-Database and Tcl scripting language, so yes, you have to use it.
Once the game is over, the king and the pawn go back in the same box.
M
MrBoss
Voice
Posts: 7
Joined: Sat Nov 21, 2009 6:34 am

Post by MrBoss »

I can install use "apt-get install mysqltcl" ?
t
thommey
Halfop
Posts: 76
Joined: Tue Apr 01, 2008 2:59 pm

Post by thommey »

It took you 7 months to figure that out?
Yes, you can 'apt-get install mysqltcl'. You load it in your script using 'package require mysqltcl', the documentation is here: http://www.xdobry.de/mysqltcl/mysqltcl.html
You can find examples here and more documentation at http://wiki.tcl.tk/mysqltcl
Post Reply