Hello There,
I am new to this website as to developing application. I found this site interesting ( imagine-program-share) however, I do not know what are my options in here and limits. My idea is to create my own dictionary, with a simple interface. I have gathered a database on MySQL server ( word + definition ) but I am now stuck.
- How can I connect Mysql database ( two fields : word / definition) to create my own dictionary software ?
- I am new to coding, I can follow instructions well, but are they any coding available that describe this function?
I might not be clear with my questions, please feel free to correct me or give me any directions.
Thank you alot,
Offline
Scratch is not that complex; it does not use databases. You need to use the block interface in the Scratch program to program your dictionary entirely. Oh, and this belongs in Help with Scripts.
Last edited by SciTecCf (2012-06-19 05:22:17)
Offline
Hi, rajakhoury! Can you tell us a little more about this dictionary application? Are you planning to use it with a certain program like the dictionary in Microsoft Office Word, or do you want the dictionary as a stand-alone program? If you just want a program, running by itself that you can use to look up words and their definitions then Scratch should be able to do that for you (it has an array system known as lists you can use. To port your lists (one of words, one of meanings) to Scratch, you will first need to get the words into a text file. This simple PHP script should help you do that:
$query = "SELECT * FROM `dictionaryList`"; mysql_query($query); $result = mysql_query($query) or die(mysql_error()); while($row = mysql_fetch_array($result)){ echo $row['words'] . "<br />"; }
That script should print a full list of words, one per line to your screen. You can then copy and paste them to a .txt file, ready to import it to Scratch. (Obviously replace the table name "dictionaryList" with your table name and the "word" column name with the name of your words and definition rows.
I'm going to move this over to the Help with Scripts section of the forums, hopefully people will be able to help you set up two lists to look up words and definitions there!
Offline