| 
	
 | 
 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] 
 |