Mysql

Just starting out? Need help? Post your questions and find answers here.
ptaylor
New User
New User
Posts: 8
Joined: Sat May 19, 2007 1:46 pm
Location: Vienna, VA

Mysql

Post by ptaylor »

Can you please give me a example of how to connect, search, add and deleted a record from mysql database please?

Thanks
Phil
rsts
Addict
Addict
Posts: 2736
Joined: Wed Aug 24, 2005 8:39 am
Location: Southwest OH - USA

Post by rsts »

I've only used sqlite, but the principles are the same.

Have you tried a search? There should be examples available. If you can't find anything relevant, let us know.

Welcome to the PureBasic forums.

cheers

You might see if this helps - http://www.purebasic.fr/english/viewtopic.php?t=26413
User avatar
netmaestro
PureBasic Bullfrog
PureBasic Bullfrog
Posts: 8433
Joined: Wed Jul 06, 2005 5:42 am
Location: Fort Nelson, BC, Canada

Post by netmaestro »

Flype has a userlibrary for this which includes full sourcecode so you should find it instructive:

http://www.purebasic.fr/english/viewtop ... rlibraries
BERESHEIT
Pantcho!!
Enthusiast
Enthusiast
Posts: 538
Joined: Tue Feb 24, 2004 3:43 am
Location: Israel
Contact:

Post by Pantcho!! »

Making this is more related to SQL language.

Connecting a database and Querying is the most easy thing you can do.
(using flype lib or Paul's MDB lib)
but how to do it that is the quetion.

for quick tutorial:
http://www.w3schools.com/sql/default.asp
ptaylor
New User
New User
Posts: 8
Joined: Sat May 19, 2007 1:46 pm
Location: Vienna, VA

Using mysql with Linux

Post by ptaylor »

Thank you for providing a good example and it works for windows. What if you going to use mysql for linux what code you would use to open, read, write and search for a record? Does the dll only work for windows and not linux?

Thanks
Phil
User avatar
Rook Zimbabwe
Addict
Addict
Posts: 4326
Joined: Tue Jan 02, 2007 8:16 pm
Location: Cypress TX
Contact:

Post by Rook Zimbabwe »

I think the SQL commandset within PB will do what you need... in fact I know it can as I do it in several programs.

Use the DatabaseUpdate() command... this holds the correct SQL request.

Read the tutorials in the HELP file to see how to structure your request.

What command are you attempting to execute? Maybe I could provide a better example.
Binarily speaking... it takes 10 to Tango!!!

Image
http://www.bluemesapc.com/
Post Reply