Ok i tried this.. and i didn't get any error listed..
so it seems that the mySQL Query is not failing in
syntax or logic.. but it's not picking up any rows.
Which is really stupid because i used my phpmyadmin
and i ran this SQL Query there and even then i got my
results..
--- Chris Hayes <[EMAIL PROTECTED]> wrote:
> At 13:37 9-3-2003, you wrote:
> >I want to display the first 3 words of my record in
> >the my table and following is the code i'm using.
> >When i use the SQL Query in mySQL.. it works
> great..
> >but when i try to implement it in my php page.. i'm
> >not getting anything.. no error, no display, no
> >result.. just blank.. why?
>
> i don't know what's wrog but you could do some quick
> debugging
> by echoing mysql_error() when the query fails.
> ($result=mysql_query(.....) or die ('<br>Query
> failed at'.__FILE__.' line
> '.__LINE__.' and mysql says:<br>'.mysql_error());
>
> ><?php
> >
> >$db = mysql_connect("localhost","user","pass");
> >mysql_select_db("mydb",$db);
> >
> >$result = mysql_query("SELECT
> substring_index(title, '
> >', 3) from news order by ID desc limit 4",$db);
> >if ($myrow = mysql_fetch_array($result)) {
> > do {
> check whether there are some results walked through
> by doing something
> silly like echo '*'; here.
>
>
> > echo(" $myrow[title] ");
> > } while ($myrow = mysql_fetch_array($result));
> >}
> >?>
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
__________________________________________________
Do you Yahoo!?
Yahoo! Tax Center - forms, calculators, tips, more
http://taxes.yahoo.com/
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php