Re: [PHP-DB] SELECT LIKE with % and without %
$sql = SELECT * FROM table WHERE ID ='$_GET[id]' AND title LIKE '%$_GET[word]%'; Original Message Subject: [PHP-DB] SELECT LIKE with %' and without %' From: Emiliano Boragina emiliano.borag...@gmail.com To: php-db@lists.php.net Date: 05/03/2009 01:43 AM Hello. I am using this: $sql = SELECT * FROM table WHERE ID LIKE '%$_GET[id]%' AND title LIKE '%$_GET[word]%'; But I want exactlu ID, not one part of many possibles Ids in the DB. How can I do that? Thanks + _ // Emiliano Boragina _ // DiseƱo ComunicaciĆ³n // + _ // emiliano.borag...@gmail.com / // 15 40 58 60 02 /// + _
Re: [PHP-DB] SELECT LIKE with % and without %
On May 2, 2009, at 6:43 PM, Emiliano Boragina wrote: Hello. I am using this: $sql = SELECT * FROM table WHERE ID LIKE '%$_GET[id]%' AND title LIKE '%$_GET[word]%'; But I want exactlu ID, not one part of many possibles Ids in the DB. How can I do that? PLEASE tell me your cleaning that input... http://php.net/mysql_real_escape_string And to answer your question: ?php $id = mysql_real_escape_string ($_GET['id']); $word = mysql_real_escape_string ($_GET['word']); $sql = SELECT * FROM `table` WHERE `ID` = '$id' AND `title` = '$word'; ? Read more on MySQL's LIKE functionality. Google can help you. HTH, ~Philip -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DB] Re: php generators
Hello, on 04/29/2009 05:39 PM Jonathan Langevin said the following: Hey Manuel, this is off topic, but did you guys recently upgrade phpclasses.org? Last I visited (a week or two ago) it seemed much snappier Not really, nothing changed. Were you accessing a mirror or the main site? Maybe it is some ad network or analytics snippet that is slowing down the problem. Are you still experiencing any problem? (more reactive) than in the past.Aside from the (previous) speed issue, I've always liked phpclasses, except for some of the really old code samples that can be found there. Would be nice to start a movement to have all of the old classes re-implemented for current-day PHP 5, as some of the classes on there are from several years ago, and are geared for PHP 4. Maybe an adopt-this-class feature on the website for classes that are old and no longer maintained? ;-) That is not something in the control of the site. Each class is independently developer by the author that submitted it. If you want to see improvements in some class, maybe you should contact the respective author using the support forums or directly. -- Regards, Manuel Lemos Find and post PHP jobs http://www.phpclasses.org/jobs/ PHP Classes - Free ready to use OOP components written in PHP http://www.phpclasses.org/ -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DB] Re: WAMP server Problem and Correct way to install PHP and MySQL???
when you click on the wamp icon in your taskbar you will get an popup menu: by clicking on phpMyAdmin your browser will open with phpMyAdmin. From there you can check the database and create databases and tables as you go. If phpmyadmin could not open. : page times out then click on the wamp icon again, move to Apache, then Service, and then click on Test port 80, then you should get something like -- Your port 80 is actually used by : Server: Apache/2.2.11 (Win32) PHP/5.2.8 Press Enter to exit... -- if you get an error on port 80 that it is in use, check that IIS is not running on your pc and if you use skype check that you selected in the options so that skype doesnt make use of port 80 If you downloaded a new WAMP version, i would suggest that you make one minor change in the php.ini file. Put a semi-colon before error_reporting = E_ALL so that it looks like this ;error_reporting = E_ALL and remove the colon before error_reporting = E_ALL ~E_NOTICE. This is just one of my personal adjustments to the wamp default php.ini file. Then for installing Apache. Like Sashikanth Gurram said WAMP is Windows Apache MySql PHP. So apache gets installed with wamp. The linux version of wamp is LAMP just for interrest sake. O yes. almost forgot. The WAMP icon should have a completely white background, not yellow. if its yellow go and check the PHP Logs, Apache Logs and MySql Logs to determine which service is not running. I do hope this help. Sashikanth Gurram sashi...@vt.edu wrote in message news:497a0a60.9000...@vt.edu... Hello everyone, I have installed WAMP server on my PC. Then I have installed the MySQL and PHP software by downloading them from the site. The PHP programs I have written used to work fine but when I tried to connect to the MySQL database or create a new database using the PHP programming nothing happens in the browser. I do not know what happened. After several attempts I finally uninstalled the MySQL and PHP programs and then when I tried to connect to the MySQL usin PHP it worked fine I do not know the reason for this. Can anyone tell me what the reason is? Further more I would like to install PHP and MySQL along with a server like APACHE. But I do not know where to download the APACHE server from. Also When I install PHP and MySQL how do I link PHP and MySQL so that they work in tandem. Would be great if anyone can clear these doubts. I know that these are very basic questions but I am a starter. Thanks, Sashi __ Information from ESET Smart Security, version of virus signature database 4052 (20090504) __ The message was checked by ESET Smart Security. http://www.eset.com __ Information from ESET Smart Security, version of virus signature database 4052 (20090504) __ The message was checked by ESET Smart Security. http://www.eset.com -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php