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 problem

Old posts that have not been replied to for several years.
Locked
D
D^

MySQL problem

Post by D^ »

Heres my problem:
I would like my bot to be able to communicate with my webby... and i would like it to be done through MySQL...

Ive looked at fatbase SQL, but i run into a problem... all the FAQs are written as one knows the location of the SQL database... i dont...

I have a website (www.netcyb.org.uk) - but i do not know what the MySQL path is to that site ;/ - Can anyone help me ??
User avatar
Papillon
Owner
Posts: 724
Joined: Fri Feb 15, 2002 8:00 pm
Location: *.no

Post by Papillon »

no need to make double posts...
Elen sila lúmenn' omentielvo
D
D^

Post by D^ »

eh? - sorry dont understand :/
User avatar
Papillon
Owner
Posts: 724
Joined: Fri Feb 15, 2002 8:00 pm
Location: *.no

Post by Papillon »

you posted exactly the same question in the tcl-boards, posting it in one place is enough :)
Elen sila lúmenn' omentielvo
D
D^

Post by D^ »

ye well sorry ... i cant move posts... i found that this forum probably was more suitable for my request....
p
pelefanten
Voice
Posts: 27
Joined: Thu Apr 17, 2003 4:37 pm

Post by pelefanten »

what you need to do in order to link to MySQL is first to link to the libraries, ie my Makefile looks like this:

Code: Select all

srcdir = .


doofus:
	@echo ""
	@echo "Let's try this from the right directory..."
	@echo ""
	@cd ../../../ && make

static: ../mystats.o

modules: ../../../mystats.$(MOD_EXT)

../mystats.o:
	$(CC) $(CFLAGS) $(shell mysql_config --cflags) $(CPPFLAGS) -DMAKING_MODS -c $(srcdir)/mystats.c
	@rm -f ../mystats.o
	mv mystats.o ../

../../../mystats.$(MOD_EXT): ../mystats.o
	$(LD) $(shell mysql_config --libs) -o ../../../mystats.$(MOD_EXT) ../mystats.o
	$(STRIP) ../../../mystats.$(MOD_EXT)

depend:
	$(CC) $(CFLAGS) $(CPPFLAGS) -MM $(srcdir)/mystats.c > .depend

clean:
	@rm -f .depend config.* *.o *.$(MOD_EXT) *~
distclean: clean

#safety hash
../mystats.o: .././mystats.mod/mystats.c ../../../src/mod/module.h \
 ../../../src/main.h ../../../src/lang.h ../../../src/eggdrop.h \
 ../../../src/flags.h ../../../src/proto.h ../../../lush.h \
 ../../../src/misc_file.h ../../../src/cmdt.h ../../../src/tclegg.h \
 ../../../src/tclhash.h ../../../src/chan.h ../../../src/users.h \
 ../../../src/compat/compat.h ../../../src/compat/inet_aton.h \
 ../../../src/compat/snprintf.h ../../../src/compat/memset.h \
 ../../../src/compat/memcpy.h ../../../src/compat/strcasecmp.h \
 ../../../src/mod/modvals.h ../../../src/tandem.h
That way it shouldnt matter where one has MySQl installed and all you need to add in your c-file is

Code: Select all

#indlude <mysql.h>
Then you'r all set...
Locked