Raised This Month: $ Target: $400
 0% 

Problem with sqlx


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
.MMYTH.
BANNED
Join Date: Sep 2010
Location: Brasil - RS
Old 11-16-2010 , 12:41   Problem with sqlx
Reply With Quote #1

I want to connect with mysql but i want create the db if not exists and the comand SQL_MakeDbTuple needs the db.

What can i do to connect without the db?
.MMYTH. is offline
Send a message via MSN to .MMYTH.
lucas_7_94
Leche Loco
Join Date: Mar 2009
Location: Argentina
Old 11-16-2010 , 12:52   Re: Problem with sqlx
Reply With Quote #2

You can work with SQLite , doesnt need a phpmyadmin.
__________________
ATWWMH - MiniDuels
Madness is like gravity, just need a little push.
lucas_7_94 is offline
Send a message via Skype™ to lucas_7_94
issen1
Member
Join Date: Jan 2010
Old 11-17-2010 , 09:52   Re: Problem with sqlx
Reply With Quote #3

CREATE TABLE IF NOT EXISTS tbl_name
http://dev.mysql.com/doc/refman/5.1/...ate-table.html

That would be another SQL Query every plugin_init, there might be a better solution.

Or to check if it does exist:
Quote:
use this command:
mysql> show tables like 'your_table_name';

in your c program you can check:
if(row_count==1)
/* then table exists; */
You then can just set a global var to true if it does exist.
__________________
greets (:
issen1 is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 19:08.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode