Solved

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

Posted on 2007-03-21
1
183 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

Does Powershell have you tied up in knots?

Managing Active Directory does not always have to be complicated.  If you are spending more time trying instead of doing, then it's time to look at something else. For nearly 20 years, AD admins around the world have used one tool for day-to-day AD management: Hyena. Discover why

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

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 …
Generating table dynamically is the most common issue faced by php developers.... So it seems there is a need of an article that explains the basic concept of generating tables dynamically. It just requires a basic knowledge of html and little maths…
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.

832 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