
07-13-2007
|
| Administrator
Join Date: Jun 2007
Posts: 3,729
BRL$: 31,945.65 Thanks: 0
Thanked 4 Times in 4 Posts
Rep Power: 403 | | About else and records Hi,I used ur coding and i added two extra line one is fetching row and another one is no.of rows coding is working but in database i have 5 records but if i run this script it shows only 4 records.If i gave echo for fetch rows it show 5 but it displayses 4 records only give me some solutions and in this script i want to add else part in that else if there is no records means i want to display no events found tell me the solution for this also.Quote:Originally Posted by *Mattmaul1992* Image: To view links or images in this forum your post count must be 1 or greater. You currently have 0 posts. ( To view links or images in this forum your post count must be 1 or greater. You currently have 0 posts. ) This is quite simple.When you assign the values to every array key in $editf it assigns them all over and over again therefore re-assigning that array key. So what you need to do is have it print out the value every time it receives a record by looping threw $editf.So your resulting code would be -PHP Code: One thing to note is it's better to use the print function instead of ending the script and then re-starting it. It's a more standard practice and from what I've heard will give you a slight performance boost which should always be kept in mind.I haven't tested the above script so there might be a syntax error with a missed quote or something but that shows you what you will want to do. To view links or images in this forum your post count must be 1 or greater. You currently have 0 posts. | |
__________________ █ High Quality To view links or images in signatures your post count must be 0 or greater. You currently have 0 posts.
█ Powerful To view links or images in signatures your post count must be 0 or greater. You currently have 0 posts.
█ To view links or images in signatures your post count must be 0 or greater. You currently have 0 posts. | | | |