[PHP-DB] Need some help with PHP coding

2011-10-12 Thread T Matias
*Need so help !!! We have a website based on the Professional theme cubit ..
For some time to now we had to migrate to another server...

After moving, the all site is working perfect... The only problem is that,
we have a home page video... And I don't know how to place that video on the
home page 

On the home page, we use to have a video beside the form But now I don't
know how to bring the video back to where it was before 
Smart Info Systems smartinfosystems.co.uk

Smartinfo specialise in providing a suite of business telephone systems and
services that use cutting edge technology to help small and medium sized
businesses lower costs and improve productivity. We have collected a number
of...


The video was working perfect before the migration, it was in .avi file
format... We are using WordPress as Content Management Systems... And the
video is a single file which are actually hosted, in one of our servers
(Internal Database ). So, there's not third part issues...

The reason for migration, was because our previous hosting provider, stooped
supporting PHP_Mail function on their servers, as our site needed that
function on, we've being forced to move to somewhere else.

The Video use to be shown on Top-left-corner, side-by-side with form which
is there now. We want to get the video player back to what it was before .

http://www.smartinfosystems.co.uk/*
*
*
-- 

Tchize Matias
Operations Director
Phone: 075 9239 13624
Blog: http://iTechReload.blogspot.com/ http://itechreload.blogspot.com/
twitter: @iTechReload http://www.twitter.com/#/iTechReload
www.iTechReload.co.uk http://www.itechreload.co.uk/
www.mydreamwave.com
Skype: tchize_black1


This e-mail (including any attachments) is private and confidential and
may contain privileged material. If you have received this e-mail in
error,   please notify the sender and delete it  (including any
attachments) immediately. You must not copy, distribute, disclose or use
any of the information in it or any attachments.

This is NOT SPAM -- we are contacting you in response from you first
contact. We have NO INTENTION to e-mail you again. You can also reply to
this e-mail with REMOVE in the subject line to make sure we'll NEVER send
you any more e-mails in the future.


[PHP-DB] Re: Need some help with PHP coding

2011-10-12 Thread Jim Giner
What makes you think it's a PHP problem?  It could be that you modified the 
location of the video file and the href= is wrong. 



-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-DB] Re: Need some help with PHP coding

2011-10-12 Thread Jim Giner
Looking at your site's webpage code, I do not see any reference to any .AVI 
files.  If it's a PHP problem, you should be looking at the portion of your 
code that is supposed to be outputting that file and html during the build 
of this webpage. 



-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-DB] SELECT syntax

2011-10-12 Thread Ron Piggott

In my Bible_Trivia table I have the columns

`trivia_answer_1`, `trivia_answer_2`, `trivia_answer_3`, `trivia_answer_4`, 
`answer`

`answer` is an integer always with a value of 1 to 4. Is there a way to use the 
value of `answer` to only select the correct trivia answer?

This doesn’t work, but this is the idea I am trying to achieve:

SELECT `trivia_answer_`answer`` FROM `Bible_trivia`

Thanks in advance,

Ron



www.TheVerseOfTheDay.info 


RE: [PHP-DB] SELECT syntax

2011-10-12 Thread Toby Hart Dyke

Not terribly elegant, but this should work:

SELECT `trivia_answer_1` AS `trivia_answer` FROM `Bible_trivia` WHERE `answer`=1
UNION
SELECT `trivia_answer_2` AS `trivia_answer` FROM `Bible_trivia` WHERE `answer`=2
UNION
SELECT `trivia_answer_3` AS `trivia_answer` FROM `Bible_trivia` WHERE `answer`=3
UNION
SELECT `trivia_answer_4` AS `trivia_answer` FROM `Bible_trivia` WHERE 
`answer`=4;

I have to say that it's likely that your design may not be the most optimal. 
What happens if you want 5 answers? Or 6?

  Toby


-Original Message-
From: Ron Piggott [mailto:ron.pigg...@actsministries.org] 
Sent: Wednesday, October 12, 2011 3:25 PM
To: php-db@lists.php.net
Subject: [PHP-DB] SELECT syntax


In my Bible_Trivia table I have the columns

`trivia_answer_1`, `trivia_answer_2`, `trivia_answer_3`, `trivia_answer_4`, 
`answer`

`answer` is an integer always with a value of 1 to 4. Is there a way to use the 
value of `answer` to only select the correct trivia answer?

This doesn’t work, but this is the idea I am trying to achieve:

SELECT `trivia_answer_`answer`` FROM `Bible_trivia`

Thanks in advance,

Ron



www.TheVerseOfTheDay.info 


--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP-DB] SELECT syntax

2011-10-12 Thread Jack van Zanen
Hi

In Oracle (and maybe others) you can use


select case
when answer=1
then trivia_answer_1
when answer=2
then trivia_answer_2
when answer=3
then trivia_answer_3
when answer=4
then trivia_answer_4
else null
end answer
from bible_trivia_table
OR

You can select all of them and process in PHP, should not be too hard to
come up with a couple of lines of code to display only 1 variable  based on
the value of variable 5. Overhead should be pretty minimal as well
You'll be writing something to display a value anyway


Jack van Zanen

-
This e-mail and any attachments may contain confidential material for the
sole use of the intended recipient. If you are not the intended recipient,
please be aware that any disclosure, copying, distribution or use of this
e-mail or any attachment is prohibited. If you have received this e-mail in
error, please contact the sender and delete all copies.
Thank you for your cooperation


On Thu, Oct 13, 2011 at 6:24 AM, Ron Piggott ron.pigg...@actsministries.org
 wrote:


 In my Bible_Trivia table I have the columns

 `trivia_answer_1`, `trivia_answer_2`, `trivia_answer_3`, `trivia_answer_4`,
 `answer`

 `answer` is an integer always with a value of 1 to 4. Is there a way to use
 the value of `answer` to only select the correct trivia answer?

 This doesn’t work, but this is the idea I am trying to achieve:

 SELECT `trivia_answer_`answer`` FROM `Bible_trivia`

 Thanks in advance,

 Ron



 www.TheVerseOfTheDay.info http://www.theverseoftheday.info/



Re: [PHP-DB] SELECT syntax

2011-10-12 Thread Amit Tandon
select casehttp://dev.mysql.com/doc/refman/5.0/en/control-flow-functions.html
works in mysql also

regds
amit

The difference between fiction and reality? Fiction has to make sense.


On Thu, Oct 13, 2011 at 3:26 AM, Jack van Zanen j...@vanzanen.com wrote:

 Hi

 In Oracle (and maybe others) you can use


 select case
 when answer=1
 then trivia_answer_1
 when answer=2
 then trivia_answer_2
 when answer=3
 then trivia_answer_3
 when answer=4
 then trivia_answer_4
 else null
 end answer
 from bible_trivia_table
 OR

 You can select all of them and process in PHP, should not be too hard to
 come up with a couple of lines of code to display only 1 variable  based on
 the value of variable 5. Overhead should be pretty minimal as well
 You'll be writing something to display a value anyway


 Jack van Zanen

 -
 This e-mail and any attachments may contain confidential material for the
 sole use of the intended recipient. If you are not the intended recipient,
 please be aware that any disclosure, copying, distribution or use of this
 e-mail or any attachment is prohibited. If you have received this e-mail in
 error, please contact the sender and delete all copies.
 Thank you for your cooperation


 On Thu, Oct 13, 2011 at 6:24 AM, Ron Piggott 
 ron.pigg...@actsministries.org
  wrote:

 
  In my Bible_Trivia table I have the columns
 
  `trivia_answer_1`, `trivia_answer_2`, `trivia_answer_3`,
 `trivia_answer_4`,
  `answer`
 
  `answer` is an integer always with a value of 1 to 4. Is there a way to
 use
  the value of `answer` to only select the correct trivia answer?
 
  This doesn’t work, but this is the idea I am trying to achieve:
 
  SELECT `trivia_answer_`answer`` FROM `Bible_trivia`
 
  Thanks in advance,
 
  Ron
 
 
 
  www.TheVerseOfTheDay.info http://www.theverseoftheday.info/
 



Re: [PHP-DB] SELECT syntax

2011-10-12 Thread Amit Tandon
another 
examplehttp://mysql-tips.blogspot.com/2005/04/mysql-select-case-example.html

regds
amit

The difference between fiction and reality? Fiction has to make sense.


On Thu, Oct 13, 2011 at 9:34 AM, Amit Tandon att...@gmail.com wrote:

 select 
 casehttp://dev.mysql.com/doc/refman/5.0/en/control-flow-functions.html 
 works in mysql also
 
 regds
 amit

 The difference between fiction and reality? Fiction has to make sense.



 On Thu, Oct 13, 2011 at 3:26 AM, Jack van Zanen j...@vanzanen.com wrote:

 Hi

 In Oracle (and maybe others) you can use


 select case
 when answer=1
 then trivia_answer_1
 when answer=2
 then trivia_answer_2
 when answer=3
 then trivia_answer_3
 when answer=4
 then trivia_answer_4
 else null
 end answer
 from bible_trivia_table
 OR

 You can select all of them and process in PHP, should not be too hard to
 come up with a couple of lines of code to display only 1 variable  based
 on
 the value of variable 5. Overhead should be pretty minimal as well
 You'll be writing something to display a value anyway


 Jack van Zanen

 -
 This e-mail and any attachments may contain confidential material for the
 sole use of the intended recipient. If you are not the intended recipient,
 please be aware that any disclosure, copying, distribution or use of this
 e-mail or any attachment is prohibited. If you have received this e-mail
 in
 error, please contact the sender and delete all copies.
 Thank you for your cooperation


 On Thu, Oct 13, 2011 at 6:24 AM, Ron Piggott 
 ron.pigg...@actsministries.org
  wrote:

 
  In my Bible_Trivia table I have the columns
 
  `trivia_answer_1`, `trivia_answer_2`, `trivia_answer_3`,
 `trivia_answer_4`,
  `answer`
 
  `answer` is an integer always with a value of 1 to 4. Is there a way to
 use
  the value of `answer` to only select the correct trivia answer?
 
  This doesn’t work, but this is the idea I am trying to achieve:
 
  SELECT `trivia_answer_`answer`` FROM `Bible_trivia`
 
  Thanks in advance,
 
  Ron
 
 
 
  www.TheVerseOfTheDay.info http://www.theverseoftheday.info/