dachshund Posted July 31, 2009 Share Posted July 31, 2009 with this <?php $id=mysql_real_escape_string($_GET['id']); if ($id != (int)$id) { echo "Invalid ID"; } else { $sql = "UPDATE content SET views=views+1 WHERE id='$id'"; mysql_query($sql) or die (mysql_error()); $sql="SELECT * FROM content WHERE id='$id'"; $result = mysql_query($sql) or die (mysql_error()); $rows=mysql_fetch_array($result); } ?> anyone know why this might be? Link to comment https://forums.phpfreaks.com/topic/168284-solved-cant-connect-to-local-mysql-server-through-socket-varrunmysqldmysqldsock/ Share on other sites More sharing options...
gevans Posted July 31, 2009 Share Posted July 31, 2009 Where's your connect script? Link to comment https://forums.phpfreaks.com/topic/168284-solved-cant-connect-to-local-mysql-server-through-socket-varrunmysqldmysqldsock/#findComment-887640 Share on other sites More sharing options...
dachshund Posted July 31, 2009 Author Share Posted July 31, 2009 this <?php session_start(); $connect= mysql_connect ("blah", "blah", "blah") or die(mysql_error()); $db = mysql_select_db ("blah", $connect); $session_name = $_SESSION['uid']; ?> Link to comment https://forums.phpfreaks.com/topic/168284-solved-cant-connect-to-local-mysql-server-through-socket-varrunmysqldmysqldsock/#findComment-887643 Share on other sites More sharing options...
TeNDoLLA Posted July 31, 2009 Share Posted July 31, 2009 It smells a bit that your mysql server is not running properly or not at all or it could be permissions issue. Also if you are connecting locally tou can try changing the host you connect from localhost to 127.0.0.1 Link to comment https://forums.phpfreaks.com/topic/168284-solved-cant-connect-to-local-mysql-server-through-socket-varrunmysqldmysqldsock/#findComment-887867 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.