jj20051 Posted November 21, 2008 Share Posted November 21, 2008 Ok I Made This Code It Pull Specific Data From The Database. I Get This Error: Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /home/irishcli/public_html/login.php on line 101 My Code: $sql = "select * from ".$t_main.", ".$t_idm_idc." where ".$t_main.".id=".$id." and idm=".$id; $info = mysql_query($sql); $i=0; while($row = mysql_fetch_array($info, MYSQL_ASSOC)){ $name=$row['name']; $total_credits=$row['total_credits']; $sent_shows=$row['sent_shows']; $sent_clicks=$row['sent_clicks']; $rec_clicks=$row['rec_clicks']; $rec_shows=$row['rec_shows']; $t_sent_shows=$row['t_sent_shows']; $t_sent_clicks=$row['t_sent_clicks']; $t_rec_clicks=$row['t_rec_clicks']; $t_rec_shows=$row['t_rec_shows']; $y_sent_shows=$row['y_sent_shows']; $y_sent_clicks=$row['y_sent_clicks']; $y_rec_clicks=$row['y_rec_clicks']; $y_rec_shows=$row['y_rec_shows']; $unsafe_credits=$row['unsafe_credits']; $ratio=$sent_clicks/$max*100; } Link to comment https://forums.phpfreaks.com/topic/133682-solved-help/ Share on other sites More sharing options...
Maq Posted November 21, 2008 Share Posted November 21, 2008 Can you echo $sql to make sure the values are valid? Link to comment https://forums.phpfreaks.com/topic/133682-solved-help/#findComment-695604 Share on other sites More sharing options...
jj20051 Posted November 21, 2008 Author Share Posted November 21, 2008 Thanks!!!! Link to comment https://forums.phpfreaks.com/topic/133682-solved-help/#findComment-695610 Share on other sites More sharing options...
Maq Posted November 21, 2008 Share Posted November 21, 2008 ??? What was wrong (curious)? Echoing $sql obviously did not solve anything. Link to comment https://forums.phpfreaks.com/topic/133682-solved-help/#findComment-695613 Share on other sites More sharing options...
jj20051 Posted November 21, 2008 Author Share Posted November 21, 2008 It Did For Me... LOL I Realized What I Did Wrong. Link to comment https://forums.phpfreaks.com/topic/133682-solved-help/#findComment-695623 Share on other sites More sharing options...
Maq Posted November 21, 2008 Share Posted November 21, 2008 That's what I was thinking... Good Job! Link to comment https://forums.phpfreaks.com/topic/133682-solved-help/#findComment-695624 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.