hookit Posted November 27, 2008 Share Posted November 27, 2008 Im a newbie. I have two php webpages in one: there is a textfield that shows the data drawn from a mysql database into a dynamic table in the other php page. What simply i want is a syntax that allows any visitor to search single registries of a DB's single field. And the query will show in the dynamic table the registries related to exactly the word written in the textfield. At the moment what i have done is create a form variable this is part of the mysql statement; He creado una variable de formulario y le he aplicado un LIKE así: WHERE database.field LIKE $_POST['textfield'] This only returns all the registries of the db's field regardles of what you type in the textfield. I do not know what to do. I need your help. I hope you understand what i want. I kindly ask you to explain it in a plain and simple manner. Have all a nice day. Link to comment https://forums.phpfreaks.com/topic/134514-solved-searching-for-the-right-query-sintax/ Share on other sites More sharing options...
revraz Posted November 27, 2008 Share Posted November 27, 2008 WHERE database.field LIKE '{$_POST['textfield']}' Link to comment https://forums.phpfreaks.com/topic/134514-solved-searching-for-the-right-query-sintax/#findComment-700462 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.