php/mysql problem posting news
ok I am sure I have all the code working and in proer order.
but for some reason it just won't work
P.S. this is a new code not the same as it was previously posted in the scripting forum
http://157.238.47.212/admin.php is the test code for yah
http://157.238.47.212/admin.zip as all the files in it
P.S im not sure if im in the right forum and lol I am not having much luck with php am I :)
thanks
==========::::::::===========
=====::: Sam Colebatch :::=====
==========::::::::===========
mairving posted this at 02:30 — 26th April 2002.
They have: 2,256 posts
Joined: Feb 2001
Usually what I do if it doesn't seem to be posting any results is to first echo the query to the screen:
<?php
$query = \"SELECT * FROM news ORDER BY id DESC LIMIT 10\";
echo $query;
$result = mysql_query($query);
?>
This will first tell you if any values at all are there to be passed to the DB. If the echo statement shows the proper values that should be inserted into the db, try it without the 'if' conditional. If it inserts the values without the 'if', then you need to review your logic. If both of these fail to produce any results, you may do a view source of your web page. I have found that sometimes I forget to stick a or around the while statement, causing the results not to show on the screen,
Mark Irving
I have a mind like a steel trap; it is rusty and illegal in 47 states
killmaster posted this at 02:36 — 26th April 2002.
They have: 22 posts
Joined: Oct 2001
so basically it is probably a statement in there in which I have forgotton to add a table tag eg: , or
but if it is not did you find anything wrong in the code?
thanks
==========::::::::===========
=====::: Sam Colebatch :::=====
==========::::::::===========
Want to join the discussion? Create an account or log in if you already have one. Joining is fast, free and painless! We’ll even whisk you back here when you’ve finished.