Jump to content

Hope you guys can help me understand this....


mastercjb

Recommended Posts

I was given this script however I was not told what to add in my MYSQL tables. This is part of the script I was given:

 

<?php 
session_start(); 
require "global_func.php"; 
if($_SESSION['loggedin']==0) { header("Location: login.php");exit; } 
$userid=$_SESSION['userid']; 
require "header.php"; 
$h = new headers; 
$h->startheaders(); 
include "config.php"; 
global $c; 
$is=mysql_query("SELECT u.*,us.* FROM users u LEFT JOIN userstats us ON u.userid=us.userid WHERE u.userid=$userid",$c) or die(mysql_error()); 
$ir=mysql_fetch_array($is); 
check_level(); 
$fm=money_formatter($ir['money']); 
$cm=money_formatter($ir['crystals'],''); 
$lv=date('F j, Y, g:i a',$ir['laston']); 
$h->userdata($ir,$lv,$fm,$cm); 
$h->menuarea(); 

 

Now this part is throwing this error:

 

Warning: mysql_query(): supplied argument is not a valid MySQL-Link resource in /home/blt3/public_html/streets.php on line 11

 

This is line 11:

 

$is=mysql_query("SELECT u.*,us.* FROM users u LEFT JOIN userstats us ON u.userid=us.userid WHERE u.userid=$userid",$c) or die(mysql_error()); 

 

 

What is that trying to select? I know its trying to pull something from my users table but what? What does LEFT JOIN mean?

[td][/td]

You may want to edit the file named "config.php" with your login and database information. Some scripts require you to do this manually or will not do it automatically during installation if file permissions or CHMODS are not set to 777 or 755. Some hosting servers change these back automatically when not allowed by the hosting comapny.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.