What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Skype & Technology » Tech Talk » Further PHP / MySQL Help

Further PHP / MySQL Help
Author: Message:
Eddie
Veteran Member
*****


Posts: 2078
Reputation: 30
32 / Male / Flag
Joined: Oct 2005
Status: Away
O.P. Further PHP / MySQL Help
I know i have asked a lot of questions here, but its teaching me new things, and you guys seem to know everything that i need to learn, and i can answer my questions myself.

I have two MySQL tables in my database;
itzeddie_pilot
itzeddie_flights

Both the tables have a varchar called "rank". I am viewing a route page, i need a php code to check the rank on the pilots table where the callsign currently in use (pilots id assuming im logged in), and then check the currently viewed flight rank is the same and if they are then it makes an echo of some random text.

Note; If anyone is willing to also add this, i have 7 other "columns" in my itzeddie_flights table, 'Monday, Tursday, Wednesday, etc'. If possible i would like it to check the current day and if also active marked by a "1" in the table then the text echo's.

I would find a way of doing it myself, or find a new method, i however i am quite tired, and it would be easier to learn the right way from you folks.

This post was edited on 04-27-2009 at 05:44 PM by Eddie.
...there used to be a signature here :)
04-27-2009 05:38 PM
Profile PM Web Find Quote Report
davidpolitis
Full Member
***


Posts: 371
Reputation: 16
Joined: Aug 2006
RE: Further PHP / MySQL Help
Would something like this start you off?
php code:
<?php
$id = "blah1" // Replace with Flight ID being viewed
$rank = "blah2"; // Replace with logged in user's rank
$rs = mysql_query("SELECT rank FROM itzeddie_flights WHERE id='{$id}'");

if(mysql_result($rs, 0, "rank.itzeddie_flights") == $rank)
{
  echo("random text!");
}
?>

P.S. I tried to really think about what you mean.

This post was edited on 05-02-2009 at 11:03 AM by davidpolitis.
05-01-2009 02:26 PM
Profile PM Find Quote Report
MeEtc
Patchou's look-alike
*****

Avatar
In the Shadow Gallery once again

Posts: 2200
Reputation: 60
38 / Male / Flag
Joined: Nov 2004
Status: Away
RE: Further PHP / MySQL Help
Find me on WLM sometime in the next 6-8h and I'll give some help
[Image: signature/]     [Image: sharing.png]
I cannot hear you. There is a banana in my ear.
05-01-2009 08:23 PM
Profile PM Web Find Quote Report
Eddie
Veteran Member
*****


Posts: 2078
Reputation: 30
32 / Male / Flag
Joined: Oct 2005
Status: Away
O.P. RE: Further PHP / MySQL Help
quote:
Originally posted by MeEtc
Find me on WLM sometime in the next 6-8h and I'll give some help
Unfortunately i have to go and fix a few computers, but i will send you an e-mail later. Thanks.
...there used to be a signature here :)
05-02-2009 02:34 AM
Profile PM Web Find Quote Report
« Next Oldest Return to Top Next Newest »


Threaded Mode | Linear Mode
View a Printable Version
Send this Thread to a Friend
Subscribe | Add to Favorites
Rate This Thread:

Forum Jump:

Forum Rules:
You cannot post new threads
You cannot post replies
You cannot post attachments
You can edit your posts
HTML is Off
myCode is On
Smilies are On
[img] Code is On