The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
||||
|
||||
[Urgent] - Little Assistance Needed
Hi,
Thanks to my good friend Stefan (Xenon) he has kindly taken some of his free time to write me a script for a maths project for college. I've already taken too much of his time so i feel guilty in asking him to make on final modification. Basically i have this query: [sql] SELECT title FROM word ORDER BY RAND() LIMIT 100 [/sql] It selects 100 random words from the word table. Now the problem with the word table is that it picks up mistakes and adds them. For example things like this would appear in the table: one...day ________ Now i want it to just ignore these and also to ignore words with apostrophes and dashes etc. So basically i only want it to select words that consist of the 26 letters in the alphabet and no extra characters. Can someone modify that query above to do that for me Thanks in Advance - miSt |
#2
|
||||
|
||||
Ok after a little help from a friend i found something like this would kind of work:
[sql] SELECT title FROM word WHERE title REGEXP "[a-zA-Z]" ORDER BY RAND(NOW()) LIMIT 100 [/sql] Now i have no idea how or why it works. But it doesn't work 100%. I still had an entry appear which was this: ben." Also i noticed 'arent' in the list so i'm not sure if this mysql thingy in that query is stripping apostrophes or what. Does anyone have any ideas Thanks - miSt |
Thread Tools | |
Display Modes | |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|