techker Posted December 20, 2011 Share Posted December 20, 2011 Hey guy im pulling info from a database :full name(in table):john doe but i need to look in another table for information this name. the issue is that in the student table there is first and last name. how can i search in first and last name if i have a full name? i have tried the like%% and used php myadmin to try combos... so example in a form im pulling full names out of a databse. john doe need to look in another DB with(John doe) for information but the table is first-last-studentID-date-class.. Link to comment https://forums.phpfreaks.com/topic/253515-search-name-with-full-name/ Share on other sites More sharing options...
techker Posted December 20, 2011 Author Share Posted December 20, 2011 im trying with SELECT Nom, prenom, MATCH (Nom,Prenom) AGAINST ('Amara') From Etudiant but i get #1191 - Can't find FULLTEXT index matching the column list Link to comment https://forums.phpfreaks.com/topic/253515-search-name-with-full-name/#findComment-1299553 Share on other sites More sharing options...
fenway Posted December 20, 2011 Share Posted December 20, 2011 Then you need to create the FULLTEXT index that spans both columns. Link to comment https://forums.phpfreaks.com/topic/253515-search-name-with-full-name/#findComment-1299718 Share on other sites More sharing options...
techker Posted December 20, 2011 Author Share Posted December 20, 2011 how does that work? Link to comment https://forums.phpfreaks.com/topic/253515-search-name-with-full-name/#findComment-1299926 Share on other sites More sharing options...
fenway Posted December 20, 2011 Share Posted December 20, 2011 how does that work? You'll have to consult the mysql refman for syntax -- I assume that's where you got "MATCH..AGAINST" from. Link to comment https://forums.phpfreaks.com/topic/253515-search-name-with-full-name/#findComment-1299933 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.