You are here: Re: Strange problem « All PHP « IT news, forums, messages
Re: Strange problem

Posted by MS on 07/24/06 17:13

At first glace it looks like you have your ' in the wrong place....

try
$myfirstquery="select ssl from hosting where dom_id='".$did."'";


"Pankaj" <panahuja@gmail.com> wrote in message
news:1153759830.828066.188970@m73g2000cwd.googlegroups.com...
> I am using the following code
>
> $myfirstquery='select ssl from hosting where dom_id='.$did;
> echo $myfirstquery;
> $result = mysql(psa, $myfirstquery) or die ("Unable to select requested
> database.".mysql_error());
>
> This gives me an error
>
> Unable to select requested database.You have an error in your SQL
> syntax; check the manual that corresponds to your MySQL server version
> for the right syntax to use near 'ssl from hosting where dom_id=185' at
> line 1
>
> However, when I run the same query from mysql prompt, I get the desired
> result. Can anyone tell me what could be the reason ?
>
> I am also facing another problem. In my next query, I get an error
> which says "Unknown column passwd in hosting". However, there is a
> column passwd in the hosting table and the query runs perfectly from
> mysql prompt.!!!!!!!!!!!!
>
> Thanks
>

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация