Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Can't execute functions

Status
Not open for further replies.
Jun 14, 1999
606
0
0
US
I've made forms that can execute simple SQL SELECT queries to MySQL:<br>First form:<br><FONT FACE=monospace><br>&lt;input type=&quot;text&quot; name=&quot;sqlquery&quot;&gt;<br></font><br>In the second form:<br>&lt;?php<br>&nbsp;&nbsp;$scx = mysql_pconnect( $server, $user, $pass );<br>&nbsp;&nbsp;$srt = mysql( $db, $sqlquery, $scx );<br>?&gt;<br></font><br>Then I go to retrieve the number of fields, of rows, and show a table with the result set contents.<br><br><b>Problem is:</b><br>If I do simple queries like &quot;SELECT col1,col2.. FROM table WHERE any_condition&quot;, it runs perfect; but if i use &quot;SELECT <font color=red>SUM</font>(coln) FROM ...&quot; never runs. It gives one row with the text of the query. I can't use SUM, or AVG, or any calculated column!.<br><br>SMTIA
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top