php, coldfusion and general web development waffle
Goto page Previous  1, 2, 3, 4, 5 ... 9, 10, 11  Next
 
Post new topic   Reply to topic    Couchtripper Forum Index -> Tech news, tips and help
View previous topic :: View next topic  
Author Message
luke



Joined: 11 Feb 2007
Location: by the sea

PostPosted: Fri Oct 12, 2012 12:36 am    Post subject: Reply with quote

has anyone ever heard of a dump file?

i found some bit of software that was supposed to convert my existing database into a mysql database, and it had some problems and didn't work like it reckoned it should, but in erroring created a dump.sql file

its just a text file full of sql statements, to make all the tables with the proper field types, and then populate those tables with the data from the original database - but i was wondering how i can actually get mysql, through that phpadmin bit i guess, to execute everything in the file?

the file is just like this;

CREATE DATABASE IF NOT EXISTS `db1`;
USE `db1`;

#
# Table structure for table 'Countries'
#

DROP TABLE IF EXISTS `Countries`;

CREATE TABLE `Countries` (
`CountryID` INTEGER NOT NULL AUTO_INCREMENT,
`Country` VARCHAR(255),
`PostageArea` INTEGER,
`PostageSequence` INTEGER DEFAULT 0,
INDEX (`CountryID`),
PRIMARY KEY (`CountryID`)
) ENGINE=myisam DEFAULT CHARSET=utf8;

SET autocommit=1;

#
# Dumping data for table 'Countries'
#

INSERT INTO `Countries` (`CountryID`, `Country`, `PostageArea`, `PostageSequence`) VALUES (1, 'Afghanistan', 3, 0);
INSERT INTO `Countries` (`CountryID`, `Country`, `PostageArea`, `PostageSequence`) VALUES (2, 'Albania', 2, 0);
INSERT INTO `Countries` (`CountryID`, `Country`, `PostageArea`, `PostageSequence`) VALUES (3, 'Algeria', 3, 0);
INSERT INTO `Countries` (`CountryID`, `Country`, `PostageArea`, `PostageSequence`) VALUES (4, 'American Samoa', 3, 0);
INSERT INTO `Countries` (`CountryID`, `Country`, `PostageArea`, `PostageSequence`) VALUES (5, 'Andorra', 2, 0);
INSERT INTO `Countries` (`CountryID`, `Country`, `PostageArea`, `PostageSequence`) VALUES (6, 'Angola', 3, 0);
INSERT INTO `Countries` (`CountryID`, `Country`, `PostageArea`, `PostageSequence`) VALUES (7, 'Anguilla', 3, 0);
INSERT INTO `Countries` (`CountryID`, `Country`, `PostageArea`, `PostageSequence`) VALUES (8, 'Antarctica', 3, 0);
INSERT INTO `Countries` (`CountryID`, `Country`, `PostageArea`, `PostageSequence`) VALUES (9, 'Antigua', 3, 0);

and on and on for all the data in each table and through all the tables

actually, now i've typed this in, i could probably just write a coldfusion page to execute all this, if i can get the basic database file created and a datasource linking it with coldfusion ... hmmm Confused
Back to top
View user's profile Send private message
faceless
admin


Joined: 25 Apr 2006

PostPosted: Fri Oct 12, 2012 12:54 am    Post subject: Reply with quote

ok, that's what I was talking about earlier about everything being in one. You should just be able to install it by clicking on 'import' in myphpadmin.

Make sure you've selected the correct database on the left first though... though you probably don't have more than one
Back to top
View user's profile Send private message Send e-mail
luke



Joined: 11 Feb 2007
Location: by the sea

PostPosted: Fri Oct 12, 2012 10:33 am    Post subject: Reply with quote

many thanks for your help faceless, you're a star! Smile

if you ever need any help with coldfusion, photoshop or anything i know about, let me know!

i think i'm going to learn mysql properly soon, it'll make things easier and more portable for the future
Back to top
View user's profile Send private message
luke



Joined: 11 Feb 2007
Location: by the sea

PostPosted: Tue Oct 30, 2012 3:53 pm    Post subject: Reply with quote

edit - problem solved, and deleted Smile

Back to top
View user's profile Send private message
luke



Joined: 11 Feb 2007
Location: by the sea

PostPosted: Tue Oct 30, 2012 4:09 pm    Post subject: Reply with quote

problem solved Smile

but now i've posted the above table layout, does that look normal to you mysql people?
Back to top
View user's profile Send private message
faceless
admin


Joined: 25 Apr 2006

PostPosted: Tue Nov 06, 2012 5:34 am    Post subject: Reply with quote

Here's an interesting page. I've never used linux, but it explains a lot very clearly.

Back to top
View user's profile Send private message Send e-mail
Brown Sauce



Joined: 07 Jan 2007

PostPosted: Tue Nov 06, 2012 1:04 pm    Post subject: Reply with quote

you can install oracle virtual box, it's free

https://www.virtualbox.org/

and use that to host a linux or mac or win3.1 os.

If you are doing any work at all it's usefull. The wamp xamp stuff is ok, but you can get much better speeds with linux on this sort of setup.

Learn to use the terminal and it gets quicker ...

I've nearly got the facebook clone together btw. It's a long process part time on ur own Smile
Back to top
View user's profile Send private message
major.tom
Macho Business Donkey Wrestler


Joined: 21 Jan 2007
Location: BC, Canada

PostPosted: Fri Nov 09, 2012 1:52 am    Post subject: Reply with quote

Brown Sauce wrote:
I've nearly got the facebook clone together btw. It's a long process part time on ur own Smile


If this site is intended for couchtrippers, the name AssGroove might suit...
Back to top
View user's profile Send private message
Brown Sauce



Joined: 07 Jan 2007

PostPosted: Fri Nov 09, 2012 8:54 am    Post subject: Reply with quote

I am looking for a name, dunno about assgroove though Smile

if and when it gets going there could always be an assgroove group ...
Back to top
View user's profile Send private message
luke



Joined: 11 Feb 2007
Location: by the sea

PostPosted: Sat Jan 12, 2013 9:19 pm    Post subject: Reply with quote

has anyone done anything, or used anything, to prevent spam being submitted on pages on a site?

i did a site a couple of months back, and the amount of spam they get is crazy - 600 odd in the past week posted on one comments page, and loads being submitted via the contact page that gets emailed to them

would something as simple as select what day it is today stop them? i don't really want to have to use one of the strange image things where you have to work out the characters, and i haven't really got the time at the moment to be coding something decent - i just want something quick and easy, or something i can just plug in!
Back to top
View user's profile Send private message
faceless
admin


Joined: 25 Apr 2006

PostPosted: Sat Jan 12, 2013 10:24 pm    Post subject: Reply with quote

the best way for the emails is to make a form page that doesn't show the actual address.

As for the spam, I suggest region blocking if that's practical for the site concerned. If you add a comment system like Disqus' then they do most of the spam filtering for you. though setting the posts to require moderation might be the best answer.
Back to top
View user's profile Send private message Send e-mail
luke



Joined: 11 Feb 2007
Location: by the sea

PostPosted: Sat Jan 12, 2013 10:37 pm    Post subject: Reply with quote

the email page is just a form - the email address isn't shown, but the spam thing just fills in the form and submits it, so it gets emailed

i've just done a quick scan of google for possible solutions, one seems to be adding a hidden text area, the spam system won't know its hidden and will complete it - so if thats filled in its spam. another is checking the time taken to submit the form, a spam system will do it really quick

another possible solution i saw was just asking what fruit beings with a! i might just try something quick and simple like that for now, although i'll have a look at that disqus system when i've got more time
Back to top
View user's profile Send private message
faceless
admin


Joined: 25 Apr 2006

PostPosted: Sat Jan 12, 2013 10:58 pm    Post subject: Reply with quote

yeah, with the reg page here I added a question and that really cut down the spammers by a good 95% (it was a mod by someone else that I was able to include).

Disqus is good for sure - I was always worried about using a separate company to store data like that, but it's been around for a few years now and a lot of big sites use it so I reckon it's safe now.
Back to top
View user's profile Send private message Send e-mail
Brown Sauce



Joined: 07 Jan 2007

PostPosted: Sun Jan 13, 2013 11:41 am    Post subject: Reply with quote

did you see this one luke,

http://www.bennadel.com/blog/2149-The-Anti-Spam-Technique-Used-On-My-ColdFusion-Job-Board.htm

it's even got all the code.
Back to top
View user's profile Send private message
luke



Joined: 11 Feb 2007
Location: by the sea

PostPosted: Sun Jan 13, 2013 12:21 pm    Post subject: Reply with quote

thanks sauce, i have checked that guys site before, but i'd not seen that. i did a google for cold fusion and spam protection and found some coldfusion plugin for the recaptcha image thing but i don't really want to have to go down that image route.

i'll have a proper look at this later, thanks

for now i think i'll go for something simple like this ...



Laughing
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Couchtripper Forum Index -> Tech news, tips and help All times are GMT
Goto page Previous  1, 2, 3, 4, 5 ... 9, 10, 11  Next
Page 4 of 11

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum


Couchtripper - 2005-2015