Search
Left Quote    By failing to prepare, you are preparing to fail.
- Benjamin Franklin    
Right Quote
 
[login] | [Register]
Forum Index » PHP and mySQL » Viewing Topic and Replies
Post Reply


        Viewing Topic: sql help.
  This user is offline  David1159
  Subject: "sql help." Posted: @ 9:47 pm on Feb 04 2008   

Member #: 526
Rank: User - (81)
Since: 12/27/07
Posts: 81
From: usa

I have my tables and columns. I inserted a message into the field, that just says "welcome.& quot; Everything there is correctly working.

I want to display the message on my page. Why does it say Resource id#3 and not the data?

I am working on a small text system for simple tasks, like welcome messages and update messages.

I want to keep this simple, I just am trying to get the idea of how sql works.



Code:

<?php

$connection = mysql_connect(& quot;--removed- -",
"--removed --",
"--removed --";
mysql_select_db ("--remove d--", $connection);


$inf = "SELECT Topic_Text FROM Topics";
$info = mysql_query($in f);
if(!$info) die(mysql_error ());

echo $info;



?>



Thank you.

Edited at 12:30:15 am on 02/05/08


Coding is simply CST... Combining $hit Together. We make different $hit to run in unison correctly.
    Viewed: 6,144 Times | Reply to This | To top
  This user is offline  David1159
  Subject: "re: sql help." Posted: @ 1:43 am on Feb 05 2008    

Member #: 526
Rank: User - (81)
Since: 12/27/07
Posts: 81
From: usa

Fixed my problem, now I am working on input system for it.




Coding is simply CST... Combining $hit Together. We make different $hit to run in unison correctly.

    Viewed: 6,133 Times | Reply to This | To top
  This user is offline  David1159
  Subject: "re: sql help." Posted: @ 2:52 am on Feb 05 2008    

Member #: 526
Rank: User - (81)
Since: 12/27/07
Posts: 81
From: usa

Well, after fighting with INSERT INTO and UPDATE ways. I got frustrated and looked at the Comment Script here since it is a similar coding design.

Thanks to the Comment Script, I saw what I was messing up.

Cheers.




Coding is simply CST... Combining $hit Together. We make different $hit to run in unison correctly.

    Viewed: 6,129 Times | Reply to This | To top
  This user is offline  bs0d
  Subject: "re: sql help." Posted: @ 2:58 am on Feb 05 2008    

Member #: 1
Rank: Admin. - (1,505)
Since: 02/06/05
Posts: 600
From: USA

Cool! The best way to learn is exactly what you're doing. Play around a bit, and see what kind of results you get.




-bs0d | AllSyntax.com

    Viewed: 6,126 Times | Reply to This | To top
Viewing Page: 1 of 1


1 |

You must be logged in to post on the forums. Login or Register








"AllSyntax.com" Copyright © 2002-2018; All rights lefted, all lefts righted.
Privacy Policy  |  Internet Rank