triphp
-
Posts
7 -
Joined
-
Last visited
Never
Posts posted by triphp
-
-
Can you give an example how to turn the multi line entries in textarea to be an array?
-
I have a textarea wherein users can input a string, i.e. names for example, line by line. And in my database I have a table that store the names.
I want to compare the names (one name per line) he entered in the textarea versus the names in the database. If the names he entered in the textarea is not yet in the database, it will be echoed back.
Does anyone know how to do the comparison? Is there a built-in function in PHP to do this? Any help or examples give is greatly appreciated :) -
How can I have a query to replace multiple strings. For example:
string = "the { quick brown " fox [ jump \/ ! £ $ %^&*«over»,.;:'#@~{ the lazy dog}|=+`<period>?]+"
I want that al those special characters found ("[\/!£$%^&*«»,.;:'#@~{}|=+`<>?]+" ) on that string will be replace by dashed(-).
What I have now is just only the space replace with dashed(-).:
SELECT REPLACE(string, ' ', '-') as turl FROM table;
I don't know how to put another argument in the from_str of REPLACE () function
Please take note that I can't use PHP ereg_replace. I have to badly do this in MySQL only. Is this possible?
-
-
Hmmm, that was just an example but the actual database design can't be made into what you have suggested. No question about the actual design, it's correctly implemented.
How to do the subqueries for that one? Two queries must not be done due to the kind of software I'm modifying.
-
I'm not very well taught on MySQL so i have this problem coming in. I have three tables, lets say, parent and child.
PARENT
parentid
parentname
CHILD
childid
parentid
childname
CHILDINFO
childid
bigbiohere
anothercolumnhereformisc_info_and_so_on
My Problem:
I want to select one random parent and then list its child at least 5 child with the bio description. Is this possible?
Please help me out.
THANKS!
Textarea list vs database entries
in PHP Coding Help
Posted