Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie
Hi there,
There is an issue with role permissions that is being worked on at the moment.
If you are having trouble with access or permissions on regional forums please post here to get access: https://www.boards.ie/discussion/2058365403/you-do-not-have-permission-for-that#latest

Php print

  • 06-04-2006 4:34pm
    #1
    Closed Accounts Posts: 8,866 ✭✭✭


    I'll just throw the whole script up. But basically the script selects customers based on the first letter of their name, so in the previous screen if i type 'A' and hit submit it gives me all the customers whose names start with A. The problem is the print lines are only printing out out the first result repeated a bunch of times. The repeat works, i.e. if there are 6 customers starting with A it will print 6 rows of details, but each row will contain the same details, which are whatever the details are pertaining to the first customer returned from the select statement! Its driving me nuts!

    <removed>


Comments

  • Registered Users, Registered Users 2 Posts: 32,136 ✭✭✭✭is_that_so


    Try using a foreach construct instead and see what's coming out.

    foreach ($array as $key=>$value)

    {
    print $key .":" .$value;
    }

    It'll do the same as counting rows.


  • Closed Accounts Posts: 8,866 ✭✭✭Adam


    Ah, got it sorted courtesy of nietzchen (apologies for mispelling of name!), thanks anyway!


Advertisement