curt22 Posted December 20, 2006 Share Posted December 20, 2006 <?phpinclude 'connect.php';$sql = 'SELECT * FROM bible WHERE MATCH($_post[\'field\']). ' AGAINST('$_post[\'find\']' IN BOOLEAN MODE) LIMIT 0, 30 ';$result = mysql_query($sql) or die(mysql_error());while($row = mysql_fetch_array($result)){echo $row['testimate'] . " " . $row['book'] . " " . $row['chapter'] . " " . $row['verse'] . " " . $row['verse text'];echo "<br/>";}?> Quote Link to comment Share on other sites More sharing options...
fenway Posted December 20, 2006 Share Posted December 20, 2006 Other than the unnecessary quoting issues, nothing syntactically... what's not working? Quote Link to comment Share on other sites More sharing options...
curt22 Posted December 20, 2006 Author Share Posted December 20, 2006 It just shows an empty page. Quote Link to comment Share on other sites More sharing options...
artacus Posted December 21, 2006 Share Posted December 21, 2006 He already told you what's wrong with it. Single quotes wont interpret variables, only double quotes will.BTW, if you are trying to put the whole bible into a mysql database, you're reinventing the wheel. Use the Sword project's diatheke instead. That way you can switch translations on a whim and its search response times are pretty amazing. Quote Link to comment Share on other sites More sharing options...
curt22 Posted December 21, 2006 Author Share Posted December 21, 2006 I tried using double quotes but the page is still not working. This time could you please tell me what to change exactly. I'm new to php and mysql and i don't know were to make the changes. Quote Link to comment Share on other sites More sharing options...
artacus Posted December 21, 2006 Share Posted December 21, 2006 [code]<?phpinclude 'connect.php';$sql = "SELECT * FROM bible WHERE MATCH($_POST[field]) AGAINST('$_POST[find]' IN BOOLEAN MODE) LIMIT 0, 30 ";$result = mysql_query($sql) or die(mysql_error());while($row = mysql_fetch_array($result)){ echo "\n$row[testimate] $row[book] $row[chapter]:$row[verse] <pre>\n$row[verse_text]</pre>";}?>[/code] Quote Link to comment Share on other sites More sharing options...
curt22 Posted December 21, 2006 Author Share Posted December 21, 2006 thanks its working now. :) Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.