simple query
Imagine i have a table "phrases" with a field "ph" with contents like these: - who was it - who wasnt it - no i didnt - yes i was - dont know who I want to make a SELECT that gives me only the entries that have the word "who": Something like SELECT * FROM `phrases` WHERE ph="who*"; I tried the manual but cant make sense of it. How can we use wildcards on selects? Thanks Pag -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: finding out what localhost is
"localhost" is used in mysql to refer to the Unix domain socket. For security, they may not even provide remote TCP access to the mysql server. If "SHOW VARIABLES LIKE 'skip_networking'" returns ON, then TCP access has been disabled. Otherwise, "SHOW VARIABLES LIKE 'port'" will tell you what port number it's listening on. Already checked the variables, the skip_network is OFF, and the port is shown. I assume its then possible to remotely connect to the database? BUt how do i know where to connect to? Thats my doubt? By domain name? By ip? Nothing seems to work. Pag -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
finding out what localhost is
Heres the problem. I have one of my client's site hosted on a crappy server, and i have it running with php+mysql ok, the thing is i need to connect to that site's mysql's database from a remote site to get some data. The problem is that on the origin site (the crappy server), to connect to the database, i use "localhost". How can i find out the real server to connect to from the other site? I tried using the whole domain, like www.crappyserver.com, but that doesnt work. :-P tried using the ip and still nothing, how can i find out the real "server/port" of the mysql database on the crappyserver? Thanks. Pag -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Selected items delete
Hi, I am kinda new to this mysql thing, so please forgive the basic question. What i need to do is, list my records on a table with a checkbox for each. After we choose several of the records, we click a button and i want to be able to delete the ones selected. Is there a simple mysql command that could perform this? I can do all the html/form/php list things, but the mysql is out of my grasp. :-P If i was too confusing, maybe this helps: How can i delete the records whose "num" field is 4,78,34 and 23, all in one command? Something along "delete * in 'table' where num=1 and num=13 and num=34" etc. Thanks a lot. Pag -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
weird comparison problem
This msg keeps bouncing off the list. First off, thanks for the hint on displaying several pages of news. :-) Am having a bit of a weird problem with a SELECT on my MYSQL database: If i use this: SELECT * FROM tablehere WHERE userid = '$uid' AND password = '$pwd' with $uid and $pwd being vars from a login form, and "Miguel" being userid on the table, i can login if i type "miguel" on the form. No matter if i type uppercase or lowercase, it always logs in, how can that be? "Miguel" is != to "miguel". (but if i misspel it, it fails, as it should :-) How can i make a correct check with upper case distinction? Thanks Pag - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Displaying news across several pages
Hi, I am a beginner in this MySQL thing, and i am trying to figure out how i can split, for example, some news articles i already have in a table, into several pages. On the site i am building, i get the 10 first news and display them. I use "SELECT FROM NEWS ... ORDER BY DATE DESC LIMIT 10". Is there any mysql command to select the next 10 items, for example? something like "LIMIT from 10 to 20" hehe, i know it sounds weird. :-) Thanks. Pag - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
ORDER dilemma
Hi all, I am kinda of a beginner in this mysql thing, so please excuse the dumb and amateur question: i have a table with several date fields: day, month, year, hour, minute and i need to order them by a specific "string that includes them, like this: "year/month/day - hour/minute" basically i need some select command like this: SELECT * FROM NEWS ORDER BY "year/month/day - hour/minute" DESC LIMIT 10 How can i do such a thing? Thanks. Pag - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php