Jump to content

jpjsmith

Members
  • Posts

    8
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling
  • Location
    USA

jpjsmith's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. i changed one line to $batting_data = \"<tr><td class=\'head\'><h3 class =\'head\'>Year</h3></td><td class=\'head\'><h3 class =\'head\'>Team</h3></td><td class=\'head\'><h3 class =\'head\'>League</h3></td><td class=\'head\'><h3 class =\'head\'>Games</h3></td><td class=\'head\'><h3 class =\'head\'>At Bats</h3></td> </tr> <tr><td><h3>$year</h3></td><td>... \"; i took out the \".\" after $batting_data before the = i guess it just didn\'t like it in this case.
  2. this is pretty much everything to do with the querry. its pretty basic and ive used this code several times with out any problems. i must be missing something! <? include(\'dbconnect.php\'); ?> <? $playerID = $_GET[\'playerID\']; $year = $_GET[\'year\']; $result = @mysql_query($sql,$connection) or die(mysql_error()); while ($row = mysql_fetch_array($result)) { $year = $row[\'yearID\']; $teamid = $row[\'Batting.teamID\']; $league =$row[\'lgID\']; $games=$row[\'G\']; $ab=$row[\'AB\']; (all the variables are here, i cut them out for the sake of brevity ) $batting_data .= \"<tr><td class=\'head\'><h3 class =\'head\'>Year</h3></td><td class=\'head\'><h3 class =\'head\'>Team</h3></td><td class=\'head\'><h3 class =\'head\'>League</h3></td><td class=\'head\'><h3 class =\'head\'>Games</h3></td><td class=\'head\'><h3 class =\'head\'>At Bats</h3></td> </tr>\"; (etc...) } ?> later on the page... <? echo \"$batting_data\"; ?> thanks for taking a look!
  3. with php, i am querrying a mysql database and getting too many resluts returned. when i should retrive one record i get back 30+ of the same record. i querried the db directly and get one result - i am POSITIVE one result is correct. this is my (rather long) sql statement: $sql = \"SELECT Batting.yearID, Batting.teamID, Batting.lgID, Batting.G, Batting.AB, Batting.R, Batting.H, Batting.2B, Batting.3B, Batting.HR, Batting.RBI, Batting.SB, Batting.CS, Batting.BB, Batting.SO, Batting.IBB, Batting.HBP, Batting.SH, Batting.SF, Batting.GIDP, Teams.name FROM Teams, Batting where Batting.teamID=Teams.teamID AND Batting.playerID =\'$playerID\' AND Batting.yearId = \'$year\' \"; i just don\'t see where i went worng! anyone have any ideas? (i added the spaces here just to make it eaiser to read) :?: :?:
  4. i understand the coulumn type for a password should be varchar and encryption is a good idea- the questoin is, how do you encrypt the password?
  5. Thanks again for your help! thats just what i needed!
  6. Great! thanks for helping. this begs one question though, if i use this auto incrementing feild as a primary key, how would i retreive its value so i can use it as a foreign key in another table? thanks again!
  7. Thanks for responding. The problem is that with both the int and bigint file types, the values do not automatically increment themselves when new entries are made into the table. The values are null or 0 if declared not null in the create table statement. Is there some code to put into the sql that will make the value if the field increment?
  8. :oops: I know this is a very simple question but I could not find (or just didn\'t look long enough) the answer. when creating a table, what is the column type for a field that is automaticaly incremented when not explcitly named in an insert statement? I plan to use this field as a primary key. Thanks for your help!! Yes, I am new to mysql!
×
×
  • 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.