0

Hi I have a parameter named "domain", and i want to use it like that

mysql_select_db($domain_blacklist)

but as you guess, it use $domain_blacklist as a prameter! How can I use only "domain" part as a parameter? thanks for help...

2
  • I don't understand what you mean. If $domain_blacklist is a string, and contains "domain" that command will select the database "domain". Is that not what you want? Commented Apr 18, 2011 at 7:51
  • $domain is a string parameter but _blacklist is a constant string Commented Apr 18, 2011 at 7:55

1 Answer 1

1

I think this is what you're looking for.

mysql_select_db($domain . '_blacklist');

If this is the answer you were looking for, you should consider going through a few PHP tutorials to get yourself familiar with the language.

http://net.tutsplus.com/articles/news/diving-into-php/

http://net.tutsplus.com/articles/web-roundups/25-resources-to-get-you-started-with-php-from-scratch/

http://net.tutsplus.com/tutorials/php/learn-php-from-scratch-a-training-regimen/

Sign up to request clarification or add additional context in comments.

1 Comment

thank you, actually i am good at c/c++ but new with php and mysql:)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.