beginner @ mySQL

Questions about the MySQL, PostgreSQL, and most other databases, as well as using it with PHP can be asked here.

Moderator: General Moderators

User avatar
vigge89
Forum Regular
Posts: 875
Joined: Wed Jul 30, 2003 3:29 am
Location: Sweden

Post by vigge89 »

i know u can't, i just wanted to show u what the output was.....
Draco_03
Forum Regular
Posts: 577
Joined: Fri Aug 15, 2003 12:25 pm
Location: Montreal, Canada

Post by Draco_03 »

k well try adding the code , should give you whatever value you have in first row first column
8)
User avatar
vigge89
Forum Regular
Posts: 875
Joined: Wed Jul 30, 2003 3:29 am
Location: Sweden

Post by vigge89 »

i know that you can't, I just wanted to show what $result contained.
BTW, the output is now 1 (without any errors), so i guess it works now :D

this seems to be the thing that made it not work:

Code: Select all

<?php
$sql = "SELECT * FROM one";
$result = mysql_query($sql) or die(mysql_error()); //If replace the $sql variable with the content of $sql, it doesn't work, but like it is now, it's working :/
?>
Last edited by vigge89 on Tue Dec 23, 2003 2:53 pm, edited 1 time in total.
Draco_03
Forum Regular
Posts: 577
Joined: Fri Aug 15, 2003 12:25 pm
Location: Montreal, Canada

Post by Draco_03 »

yes it must be that you first field is ID and the value it's 1..
i guess
Post Reply