Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

PHP Forum


You are currently viewing our PHP Forum as a guest. Please register to participate.
Login



Freelance Jobs

Reply
variable name (need reply)
Old 07-28-2010, 02:24 AM variable name (need reply)
Skilled Talker

Posts: 97
Trades: 0
my question :

i want to distinguish that this value is for which team (t1 or t2), and it's id will be inserted in table which table (yellow for yellow cards table and g for goals table).

how to distribute varibale name to know for which table and team is this variable ??.


example:

i have a from for world cup players.
the variables are created automatically using mysql.
this is one of my variables:
$t1_yellow_1 = 24;
this variable means that
t1 --> team number one
yellow --> this player took a yellow card in this match
1 --> counter
24 --> id of player



another example
$t2_g_7_2=4;
$t2 --> team 2
g --> this player scored goal(s) in this match
7 --> id of player
2--> counter
4 --> number of goals scored by this player
john_zakaria is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 07-28-2010, 08:35 AM Re: variable name (need reply)
Super Talker

Posts: 139
Name: John Davis
Trades: 0
The humanity created arrays for such things.
MySQL generates query result only (not variables). The other code may process query result to a variables. Exactly this code must prepare proper information in arrays view:

$player['team']='t1';
$player['yellow']='yes';
$player['counter']=1;
$player['id']=24;
__________________
»
Please login or register to view this content. Registration is FREE
- Interactive maps for websites
»
Please login or register to view this content. Registration is FREE
for web developers
MapMaster is offline
Reply With Quote
View Public Profile Visit MapMaster's homepage!
 
Reply     « Reply to variable name (need reply)
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.12746 seconds with 12 queries