Databases

Posts 1–15 of 27 · Page 1 of 2
Databases
I'm not very good with databases and don't really know much about the language.. I forget what it was called, but can anyone guide me through to
loading a single columned into a list and
submitting a 9 character length string into it?

I already figured out that I needed mysql connector and I have it installed and imported to my project already. Other than that, I'm lost
I hardly suggest you to use php / mysql otherwise you will just get hacked. I will send you some functions tomorrow.. Going to sleep 4:42 am atm o.o
Quote Originally Posted by Vormz View Post
I hardly suggest you to use php / mysql otherwise you will just get hacked. I will send you some functions tomorrow.. Going to sleep 4:42 am atm o.o
Thank you.

Also, it don't have to be protected.
Quote Originally Posted by DawgiiStylz View Post

Thank you.

Also, it don't have to be protected.
Well you have always to be protected, otherwise there is no sense with completing a project which was made for making the life easier.
Believe me, it makes you feel shit when you get hacked..

Sent you something via pm. Goodluck!
Quote Originally Posted by Vormz View Post
I hardly suggest you to use php / mysql otherwise you will just get hacked. I will send you some functions tomorrow.. Going to sleep 4:42 am atm o.o
Could you Give it to me too? I hardly need it !
If it's MySQL then inserting is something like
INSERT INTO `Database`.`Table` (`Column `) VALUES ('Value');
Quote Originally Posted by rileyjstrickland View Post
If it's MySQL then inserting is something like
INSERT INTO `Database`.`Table` (`Column `) VALUES ('Value');
Could you tell me what each word means, please?
Thats the only thing I don't get is that language.
I appreciate the help from everyone
First of all, like a previous comment was intending to say, you should always use php + mysql and simply have the vb.net script act as shell. The vb.net simply should post the needed data at the server to prevent potential server comprising.

Second, to recall information you can say:
"SELECT * FROM `DatabaseName`.`TableName`"
or, let's say you only want to select things from the last 2 weeks (this will be written in php):
"SELECT * FROM `DatabaseName`.`TableName` WHERE `TableName`.`TimeSubmitted` > '" . (time() - (24 * 60 *60 *14)) . "'"

And now, for the kicks and giggles, let's say we want to get information from the last 2 weeks and want it sorted by most recent:
"SELECT * FROM `DatabaseName`.`TableName` WHERE `TableName`.`TimeSubmitted` > '" . (time() - (24 * 60 *60 *14)) . "' ORDER BY `TableName`.`TimeSubmitted` DESC"

Again, these examples are php based as, in my opinion, php is a much better option for sql interaction.
Quote Originally Posted by LilGho$t View Post
First of all, like a previous comment was intending to say, you should always use php + mysql and simply have the vb.net script act as shell. The vb.net simply should post the needed data at the server to prevent potential server comprising.

Second, to recall information you can say:
"SELECT * FROM `DatabaseName`.`TableName`"
or, let's say you only want to select things from the last 2 weeks (this will be written in php):
"SELECT * FROM `DatabaseName`.`TableName` WHERE `TableName`.`TimeSubmitted` > '" . (time() - (24 * 60 *60 *14)) . "'"

And now, for the kicks and giggles, let's say we want to get information from the last 2 weeks and want it sorted by most recent:
"SELECT * FROM `DatabaseName`.`TableName` WHERE `TableName`.`TimeSubmitted` > '" . (time() - (24 * 60 *60 *14)) . "' ORDER BY `TableName`.`TimeSubmitted` DESC"

Again, these examples are php based as, in my opinion, php is a much better option for sql interaction.
How could I get the data and add it to a list?

This what I have so far
Code:
Try            conn.Open()


            Dim sqlString As String = "SELECT Code FROM MonsterWarlord ORDER BY Index"
            Dim reader As MySqlDataReader
            Dim adapter As New MySqlDataAdapter
            Dim command As New MySqlCommand
            With command
                .CommandText = sqlString
                .CommandType = CommandType.Text
                .Connection = conn
            End With
            adapter.SelectCommand = command
            reader = command.ExecuteReader
            While reader.Read()
                codeList.Add(reader.GetString(1))
            End While


        Catch ex As Exception


        End Try
Quote Originally Posted by DawgiiStylz View Post

How could I get the data and add it to a list?

This what I have so far
Code:
Try            conn.Open()


            Dim sqlString As String = "SELECT Code FROM MonsterWarlord ORDER BY Index"
            Dim reader As MySqlDataReader
            Dim adapter As New MySqlDataAdapter
            Dim command As New MySqlCommand
            With command
                .CommandText = sqlString
                .CommandType = CommandType.Text
                .Connection = conn
            End With
            adapter.SelectCommand = command
            reader = command.ExecuteReader
            While reader.Read()
                codeList.Add(reader.GetString(1))
            End While


        Catch ex As Exception


        End Try
Mind giving some example results that the query should be returning?
Quote Originally Posted by DawgiiStylz View Post

How could I get the data and add it to a list?

This what I have so far
Code:
Try            conn.Open()


            Dim sqlString As String = "SELECT Code FROM MonsterWarlord ORDER BY Index"
            Dim reader As MySqlDataReader
            Dim adapter As New MySqlDataAdapter
            Dim command As New MySqlCommand
            With command
                .CommandText = sqlString
                .CommandType = CommandType.Text
                .Connection = conn
            End With
            adapter.SelectCommand = command
            reader = command.ExecuteReader
            While reader.Read()
                codeList.Add(reader.GetString(1))
            End While


        Catch ex As Exception


        End Try
If you're getting the data in vb.net, i don't know. If you get it in php you can output it via the echo command inside of a while loop for the query and then put a delimiter between each one.

Just saw you figured it out which makes my post kind of useless, but oh well. Again, i still very strongly recommend using php + vb.net.
I figured it all out. Thank you.
Ok, I'm curious about the security risks that everyone was talking about. How would you go about this while being 'secured'.

Which I'm thinking.. people can check where the program is communicating with.. such as websites and ect.. or via the code where you can look at strings on databases information that no one should have..

I read here that sql and php isn't secured.. what is a better alternative?
Posts 1–15 of 27 · Page 1 of 2

Post a Reply

Similar Threads

Tags for this Thread

None

Need help?