/    Sign up×
Community /Pin to ProfileBookmark

whats wrong with this, i have been stimped on it for too long now ?

[code=php]
$sql = “SELECT `asp.link`, `php.link`, `java.link`, `js.link`, `perl.link`, `cgi.link`, `net.link`, `html.link`, `xhtml.link`, `xml.link`, `css.link`, `jsp.link`, `sql.link` FROM `asp`, `php`, `java`, `js`, `perl`, `cgi`, `net`, `html`, `xhtml`, `xml`, `css`, `jsp`, `sql`”;[/code]

i have tried several alterations of it including
no backticks
no from clause section
SELECT link FROM asp, php ….
and others

just cant get the thing to work

get this error with the current statement above
Unknown column ‘asp.link’ in ‘field list’

to post a comment
PHP

7 Comments(s)

Copy linkTweet thisAlerts:
@KierenFeb 13.2005 — Looks like your 'asp.link' column isnt in one of the tables
Copy linkTweet thisAlerts:
@96turnerriauthorFeb 13.2005 — but it is

CREATE TABLE asp (

link varchar(255) NOT NULL default '',

rating decimal(2,1) NOT NULL default '0.0',

date varchar(10) NOT NULL default ''

) TYPE=MyISAM;

thats the problem
Copy linkTweet thisAlerts:
@BeachSideFeb 13.2005 — [i]Originally posted by 96turnerri [/i]

[B]link varchar(255) NOT NULL default '',[/B][/QUOTE]


Wouldn't this need to be [b]asp.link varchar(255) NOT NULL default '',[/b][/quote]
Copy linkTweet thisAlerts:
@96turnerriauthorFeb 13.2005 — no, appreciate the help from both of you so far, any more ideas?

asp.link broken down refers to the table 'asp' and the field 'link'

so say you had 2 tables designers and programmers and wanted to know who was in both you could do

SELECT * FROM designers WHERE designers.email = programmers.email

p.s. like the beach side hosting site
Copy linkTweet thisAlerts:
@JonaFeb 13.2005 — [font=trebuchet ms][url=http://dev.mysql.com/doc/mysql/en/multiple-tables.html]This help?[/url][/font]
Copy linkTweet thisAlerts:
@BeachSideFeb 13.2005 — Ahhhh HAH I did not know this I have been doing it the hard way then. I'm gonna go and grumble and groan in a corner for awhile :p

ps Thx glad you like it ?
Copy linkTweet thisAlerts:
@96turnerriauthorFeb 13.2005 — hi guys,

ok thanks for you help but i followed all that before and couldnt get it working, so i just done it like so in the end

[code=php]
include("mysql.conn.php");
$result = mysql_list_tables("webdevel_links");
$num_rows = mysql_num_rows($result);
for ($i = 0; $i < $num_rows; $i++) {
$db = mysql_tablename($result, $i);
$query = "SELECT link FROM ".mysql_tablename($result, $i);
$result2 = mysql_query($query) or die(mysql_error());
$$db = mysql_num_rows($result2);
$total += mysql_num_rows($result2);
}
[/code]
×

Success!

Help @96turnerri spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.7,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...