Jump to content

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


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.

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.