Solved

How do i write phrase php variables in the SELECT statement.

Posted on 2007-03-21
1
177 Views
Last Modified: 2012-06-21
How would i write this?

If the country was 'australia' and I wanted the select statement to look like this "SELECT * FROM tbl_australia and so on

How would I write it?

I tried a few examples:

"SELECT * FROM tbl_'$country'
0
Comment
Question by:Alpha_AI
1 Comment
 
LVL 17

Accepted Solution

by:
HuyBD earned 50 total points
ID: 18769432
'SELECT * FROM tbl_'.$country
or
"SELECT * FROM tbl_$country"

HuyBD;
0

Featured Post

Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

Join & Write a Comment

This article will explain how to display the first page of your Microsoft Word documents (e.g. .doc, .docx, etc...) as images in a web page programatically. I have scoured the web on a way to do this unsuccessfully. The goal is to produce something …
Developers of all skill levels should learn to use current best practices when developing websites. However many developers, new and old, fall into the trap of using deprecated features because this is what so many tutorials and books tell them to u…
The viewer will learn how to dynamically set the form action using jQuery.
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.

744 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now