Post out the full error for us. Kind of hard to tell what it's complaining aboutYou're right, thanks for pointing that out.
However, I still get the same error. :/ I'll keep working on it.
Post out the full error for us. Kind of hard to tell what it's complaining aboutYou're right, thanks for pointing that out.
However, I still get the same error. :/ I'll keep working on it.
been at it for about 4 months now. every night after work, religiously.
i know things that i would have been at last year
i wish i started 3 years ago
With regards to my post above...
I'm trying to create a while loop that gets data from two seperate database tables. When it does, it does a subtraction between a column from both tables. It checks if the result is over the "limit". If it's not, it prints out a coloumn data from the row.
Here's my code:Code:http://pasteguru.com/18798
I get an error in line 15 saying: "mysql_fetch_array() expects parameter 1 to be resource, boolean given in..."
Can someone tell me where I'm going wrong or how to better excute this code?
Thanks, I'll make that change to my code.Try changing && to || in line 11 so it displays an error when either of the queries is false.
And in line 15 try adding parenthesis like the following:
Code:while(($row1 = mysql_fetch_array($result1)) && ($row2 = mysql_fetch_array($res2)))
Just to let you know, this task is part of my coursework, so I had change the variable names of my code because I don't want it searchable on the internet.Post out the full error for us. Kind of hard to tell what it's complaining about
I'm thinking it may be the $num variable in your if condition. I don't see it defined anywhere,.
It could also be your while statement that is causing the problem. It looks like you are using the assignment operator '=' instead of the comparison operator ==.
Try
while($row1 == mysql_fetch_array($result1) && $row2 == mysql_fetch_array($res2))
Hey guys, been awhile since I've posted in here. I want to get back into coding and back into a project that I've been working on. I want to delve back into javascript/sql database management stuff and am getting ready to purchase a new laptop that I'm going to keep solely for coding and managing my music booking business.
I've been doing some research for a bit and thought I was going to settle on a macbook pro. After a little more digging I've come to the conclusion that I think a Macbook Air with 8gb ram will serve me well. Can anyone tell me if you think this is a bad idea or would this properly suit my needs like I'm thinking it will. Any feedback from you guys would be greatly appreciated. I miss the days of learning languages and building from scratch
Thank you.I should be on
Hows the new job going?`I think I'm going to get heavy into data structures and algorithms and mathematics soon. I already know enough languages decently enough. Time to really focus on the knowledge that spans across languages.
Thank you.
I'm making some progress with my code, here.
It runs, but it prints a "Notice: Undefined variable: row2 in" error in line 16. After that line it prints 12,997 line list of row names, when there's only 300 in my database. Now, I do want it to print out a list of row names (like I defined in my echo statement), but 12,997 rows isn't right. It should only be selecting rows that have a "num" under or equals to 20.
Hows the new job going?`
Thanks. What I did was put a * (select all) in the query, so the $row2 can pick up its easting variable.Where is $row2 being defined in the code?
Thanks. What I did was put a * (select all) in the query, so the $row2 can pick up its easting variable.
There's no error message now, but there's no result on screen (no row names returned).
I'll keep on working on this and send you an update once I've figured it out.