-
SitePoint Enthusiast
problems with quotes
Hi all.
I would like to seek help for my problem:
Code:
$platform = 'Playstation';
$game = 'Ace Combat II';
$table1 = 'PlaystationGames';
$table2 = 'PlaystationCodes';
$sql = "SELECT Id, Gid, Publisher, Developer FROM $table1 WHERE game='$game'";
The above code works but i would like to use the $platform variable inside $table1 and $table2.
I tried doing this but it dosen't work:
$platform = 'Playstation';
$game = 'Ace Combat II';
$table1 = '$platformGames';
$table2 = '$platformCodes';
$sql = "SELECT Id, Gid, Publisher, Developer FROM $table1 WHERE game='$game'";
Any help?
-
Hi,
Try this:
$table1 = $platform . 'Games';
-
********* Callithumpian
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
Bookmarks