Current location: Hot Scripts Forums » Programming Languages » PHP » Can't connect to local MySQL ERROR


Can't connect to local MySQL ERROR

Reply
  #1 (permalink)  
Old 03-27-04, 09:42 AM
Abdul Abdul is offline
Newbie Coder
 
Join Date: Mar 2004
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
Can't connect to local MySQL ERROR

Hi there I am having an error when i tried to run the script below i.e. Warning: Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2) in line 3 can anyone help me please because i dont have any idea whats wrong with my script

<?
$sql = "select 1 from temp limit 1";
$check = mysql_query($sql);
$temp = mysql_result($check,0,0);

if ($temp == 0)
{
for ($i=0;$i<sizeof($Sport);$i++)
{
if (isset($Sport[$i]))
{
$query = "CREATE TEMPORARY TABLE IF NOT EXISTS temp
SELECT * FROM unisport WHERE SportID = '$Sport[$i]'";
$result = mysql_query($query);
}
?>
Reply With Quote
  #2 (permalink)  
Old 03-27-04, 02:43 PM
fie fie is offline
Newbie Coder
 
Join Date: Mar 2004
Posts: 13
Thanks: 0
Thanked 0 Times in 0 Posts
Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
PHP and MySQL ? rob2132 Hot Scripts Forum Questions, Suggestions and Feedback 4 08-29-08 02:22 AM
Can't connect to local MySQL Abdul Script Requests 3 04-02-04 02:35 AM
php or mysql parse error ( ? ) jrave PHP 8 03-09-04 01:14 PM
I need a bit of help, with MySQL connect H-a-V-o-C_88 PHP 4 12-03-03 02:05 PM
upload local mysql to internet borgo PHP 1 06-26-03 12:04 AM


All times are GMT -5. The time now is 10:21 AM.
vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.