<?php $con = mysql_connect("localhost","melennet_mmsearc","password"); if (!$con) { die('Could not connect: ' . mysql_error()); } mysql_select_db("melennet_mysearch", $con); $result=mysql_query("select * from search where word='"something"' limit 1"); print $result; ?> Code (markup): I am getting an error. Any ideas?
<?php $con = mysql_connect("localhost","melennet_mmsearc","password"); if (!$con) { die('Could not connect: ' . mysql_error()); } mysql_select_db("melennet_mysearch", $con); $result=mysql_query("select * from search where word='\"something\"' limit 1"); print $result; ?> PHP:
solved. for next person who has this, this was my final solution: <?php $con = mysql_connect("localhost","melennet_mmsearc","asdf1234"); if (!$con) { die('Could not connect: ' . mysql_error()); } mysql_select_db("melennet_mysearch", $con); $result=mysql_query("select url from search where word='THEWORD' limit 1"); $something = mysql_fetch_row($result); $something = $something[0]; print $something; ?> Code (markup): probably not the most efficient thing in the world but it works