Mink Posted September 21, 2007 Share Posted September 21, 2007 I wrote the code below to access tables that my Drupal installation created to insert information into a custom php page. Specifically it links pictures to a data type pulled from Druapl and makes them all nice. It was working just dandy before, but then 1and1 hosting decided they wanted to overcharge me and then make my site setup unavailable. I got over that quickly, got a new host, and now on the new host the code below is not working. The table is set up like this: What is happening is that the code pulls up the information from the same picture, and it will not put the correct number of images (as you can see in the picture, 3 images but on the report only 2 show). The image is posts is only for the image with "delta" of 0. Please assist! Thanks in advance. <?php $result = mysql_query("SELECT * FROM files where nid='$CR'") or die(mysql_error()); $tot=count($result); $num=0; while ( $tot >= $num ) { $question= mysql_query("SELECT * FROM content_field_uphoto where nid='$CR' and delta=$num") or die(mysql_error()); $pic= mysql_fetch_array($question); $url = $pic['field_uphoto_alt'] ; print ("<a href='http://curseoftime.com/GRS/drupal/files/$url'><img src='http://curseoftime.com/GRS/drupal/files/$url' height=150 width=150></a> "); $num++; } ?> Quote Link to comment https://forums.phpfreaks.com/topic/70184-problems-after-moving-server/ Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.