Jump to content

Show insert data in database on my website?


eduard

Recommended Posts

The only thing which isn´t correct: I don´t want the first column, but I want the most recent query!Update?Description Price Quantity w2 4

Link to comment
Share on other sites

  • Replies 190
  • Created
  • Last Reply
- I am the only disabled Dutch man living in Chile
How do you know that? Can you prove it? Moreover, what difference does it make that you're disabled, Dutch, or living in Chile? You don't need to walk around to learn how to program. If I recall, it was also your choice to move to Chile. If you don't like it there, you shouldn't have moved there.
- I am the only person who receives 2 year and a half (very!) bad e-mails of his family who say for 2 years and a half stop supporting me
It sounds like your family supported you for 40+ years. That's more than most people get. You should be thankful they supported you all those years. They didn't need to.
- I am the only disabled person who lives alone in a non-adapted house in Chile
Can you prove that? What difference does it make? People with more problems than you can still rise above them.
- I assume I am the only person of this forum to whom lives the daughter of the chilean owner lives next door
I don't know what you mean. I live next to several daughters myself.
I have to find a suitable place for me, where I can work quiet! However, to achieve that money is necesary!
Yeah, no kidding money is necessary. The question is why are you counting on making money programming when you're not even able to learn it? Why not do something else instead? Write another book. Come back to programming when you're actually able to learn it, because you're not able to learn it now. You've proven my point though, you think your life somehow makes your situation unique. There's not an adult walking this planet who doesn't have stress in their lives, but they learn how to deal with stress and still be successful. I don't see that from you, I see a defeatist attitude.
Link to comment
Share on other sites

The only thing which isn´t correct: I don´t want the first column, but I want the most recent query!Update?Description Price Quantity w2 4
that should be the last record of details that has been submitted, which is what you wanted, if you are talking about how they are displayed? as like a column, well that would be down to you not creating a simple table correctly, (as usual), to hold the data.
echo"<table border='1'><tr><th>Description</th><th>Price</th><th>Quantity<th></tr>";while($row = mysql_fetch_assoc($result)){echo "<td>" . $row['Description'] . "</br>";echo "<td>" . $row['Price'] . "</td>";echo "<td>" . $row['Quantity'] . "</td>";}echo "</table>";

should be

echo"<table border='1'><tr><th>Description</th><th>Price</th><th>Quantity<th></tr>";while($row = mysql_fetch_assoc($result)){echo "<tr><td>" . $row['Description'] . "</td>";echo "<td>" . $row['Price'] . "</td>";echo "<td>" . $row['Quantity'] . "</td></tr>";}echo "</table>";

Link to comment
Share on other sites

Insert INTO my dbSelect OUT of my dbSorry, I assume you meant the files!
Okay with the help of the boys here, this is what I came up with...who know what they are talking about this is my output_file called display.php..Look it over carefully it does what you want I believe...
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"><html><head><title>Display</title><link rel="stylesheet" type="text/css" href="/icc/skins/My_Start_Style.css" /></head><body><?php include("menu.php"); ?><?php$conn = mysql_connect("localhost", "xxxxxx", "xxxxx");if (!$conn) {	echo "Unable to connect to DB: " . mysql_error();	exit;}  if (!mysql_select_db("xxxxxxx")) {	echo "Unable to select mydbname: " . mysql_error();	exit;}$sql = "SELECT  * FROM  twal";		//WHERE  twal_id = 1";$result = mysql_query($sql);if (!$result) {	echo "Could not successfully run query ($sql) from DB: " . mysql_error();	exit;}if (mysql_num_rows($result) == 0) {	echo "No rows found, nothing to print so am exiting";	exit;}echo "<table border='1'><tr><th>ID</th><th>SRNumber</th><th>Tenant</th><th>Floor</th><th>Tower</th><th>Job Description</th><th>Labour Cost</th><th>Material Cost</th><th>Date TWA Sent to Tenant</th><th>Date TWA Approved</th><th>Date Parts Ordered</th><th>Supplier</th><th>Date Job Completed</th><th>Date Billing Given to Accounting</th></tr>";// While a row of data exists, put that row in $row as an associative array// Note: If you're expecting just one row, no need to use a loop// Note: If you put extract($row); inside the following loop, you'll//	   then create $userid, $fullname, and $userstatuswhile ($row = mysql_fetch_assoc($result)) {	echo "<tr>";	echo "<td>" .$row["id"]."</td>";	echo "<td>" .$row["srnumber"]."</td>";	echo "<td>" .$row["tenant"]."</td>";	echo "<td>" .$row["floor"]."</td>";	echo "<td>" .$row["tower"]."</td>";	echo "<td>" .$row["job_description"]."</td>";	echo "<td>" .$row["labour_cost"]."</td>";	echo "<td>" .$row["material_cost"]."</td>";	echo "<td>" .$row["date_twa_sent_to_tenant"]."</td>";	echo "<td>" .$row["date_twa_approved"]."</td>";	echo "<td>" .$row["date_parts_ordered"]."</td>";	echo "<td>" .$row["supplier"]."</td>";	echo "<td>" .$row["date_job_completed"]."</td>";	echo "<td>" .$row["date_billing_given_to_accounting"]."</td>";	echo "</tr>";  }echo "</table>";mysql_free_result($result);?> </body></html>

Cheers

Link to comment
Share on other sites

I just looked over your script here and found an simple error ...which you overlooked..you have to read your script carefully...and slowly piece by piece to find error's..here is your error's

that should be the last record of details that has been submitted, which is what you wanted, if you are talking about how they are displayed? as like a column, well that would be down to you not creating a simple table correctly, (as usual), to hold the data.
echo"<table border='1'><tr><th>Description</th><th>Price</th><th>Quantity<th></tr>";while($row = mysql_fetch_assoc($result)){echo "<td>" . $row['Description'] . "</br>";<<<<<<<< HERE IS YOUR ERROR= SHOULD BE "</td>" not "</br>"or its just missing...echo "<td>" . $row['Price'] . "</td>";echo "<td>" . $row['Quantity'] . "</td>";}echo "</table>";

should be

echo"<table border='1'><tr><th>Description</th><th>Price</th><th>Quantity<th></tr>";while($row = mysql_fetch_assoc($result)){echo "<tr><td>" . $row['Description'] . "</td>";echo "<td>" . $row['Price'] . "</td>";echo "<td>" . $row['Quantity'] . "</td></tr>";}echo "</table>";

Link to comment
Share on other sites

How do you know that? Can you prove it? Moreover, what difference does it make that you're disabled, Dutch, or living in Chile? You don't need to walk around to learn how to program. If I recall, it was also your choice to move to Chile. If you don't like it there, you shouldn't have moved there.It sounds like your family supported you for 40+ years. That's more than most people get. You should be thankful they supported you all those years. They didn't need to.Can you prove that? What difference does it make? People with more problems than you can still rise above them.I don't know what you mean. I live next to several daughters myself.Yeah, no kidding money is necessary. The question is why are you counting on making money programming when you're not even able to learn it? Why not do something else instead? Write another book. Come back to programming when you're actually able to learn it, because you're not able to learn it now. You've proven my point though, you think your life somehow makes your situation unique. There's not an adult walking this planet who doesn't have stress in their lives, but they learn how to deal with stress and still be successful. I don't see that from you, I see a defeatist attitude.
I didn´t think I have to explain this to you, but you don´t understand it!There are physical disabled and you have mentally disabled people. Fortunately I belong to the first group. Therefore I´ll never use my disabillity as an excuse for programming! But, it´s a fact that I´ll need much more time than people without disabillity (e. g. dressing, shopping, cleaning, etc. ESPECIALLY in a country like Chile where there aren´t any facilities for disabled persons!The other things of your reply are too ridiculous! I don´t have to PROVE anything, because they are facts! If you can prove they aren´t facts, I´ll ship you 2 boxes of Hoegaarden!
Link to comment
Share on other sites

:)
I didn´t think I have to explain this to you, but you don´t understand it!There are physical disabled and you have mentally disabled people. Fortunately I belong to the first group. Therefore I´ll never use my disabillity as an excuse for programming! But, it´s a fact that I´ll need much more time than people without disabillity (e. g. dressing, shopping, cleaning, etc. ESPECIALLY in a country like Chile where there aren´t any facilities for disabled persons!The other things of your reply are too ridiculous! I don´t have to PROVE anything, because they are facts! If you can prove they aren´t facts, I´ll ship you 2 boxes of Hoegaarden!
You know what I think you should stick to your problem with the code..did you see one error I found..I posted and pointed it out for you...good luck..Now enough of the pity...the guys here are trying their best to explain to you what is wrong..but either you can't understand or are unwilling to understand..they won't write the code for you ..cause you can't learn if they did that for you...Read my posts with my code carefully ....
Link to comment
Share on other sites

Just noticed something else but could be wrong...

echo "<tr><td>" . $row['Description'] . "</td>";

try this instead... ["Description"]."</td>"; try using the double " "

Link to comment
Share on other sites

ESPECIALLY in a country like Chile where there aren´t any facilities for disabled persons!
Then why the heck did you move to Chile if it's so difficult for you to live there?
I don´t have to PROVE anything, because they are facts! If you can prove they aren´t facts, I´ll ship you 2 boxes of Hoegaarden!
They're facts, but you want me to disprove them anyway? You're saying you have 2 cases of beer on the bet that there is exactly one disabled Dutch man living in Chile, and that there is exactly one disabled person living alone in a non-adapted house in Chile? I mean, according to this article there are over 2 million disabled people in Chile:http://www.ilovechile.cl/2010/12/09/only-9...-employed/14411You think all of them are either living with other people, or are living in adapted houses? I doubt that. What I don't understand is why you, as a disabled person, decided to move to a country where 9% of the disabled people have jobs. Maybe these people can help:http://www.senadis.cl/
Link to comment
Share on other sites

Then why the heck did you move to Chile if it's so difficult for you to live there?They're facts, but you want me to disprove them anyway? You're saying you have 2 cases of beer on the bet that there is exactly one disabled Dutch man living in Chile, and that there is exactly one disabled person living alone in a non-adapted house in Chile? I mean, according to this article there are over 2 million disabled people in Chile:http://www.ilovechile.cl/2010/12/09/only-9...-employed/14411You think all of them are either living with other people, or are living in adapted houses? I doubt that. What I don't understand is why you, as a disabled person, decided to move to a country where 9% of the disabled people have jobs. Maybe these people can help:http://www.senadis.cl/
2 million disabled people in Chile! Probably right! But no Dutchman! I doubt very much if another disabled person lives here alone (very strange here!). Why I moved to here? Simple, because I didn´t know before that the conditions for disabled persons are very poor here! (neither did I know that there´s a lot of discrimination!). A big difference is that I was in a wheelchair, now I have a walker! And Chile also has a lot of advantages: litle stress, cleaner, less populated, beautiful country, (beautiful women), etc. Look for: Jacques Anquetil He´s my example(?) If they said to him: you can´t, he said: I can! So I am!
Link to comment
Share on other sites

2 million disabled people in Chile! Probably right! But no Dutchman! I doubt very much if another disabled person lives here alone (very strange here!). Why I moved to here? Simple, because I didn´t know before that the conditions for disabled persons are very poor here! (neither did I know that there´s a lot of discrimination!). A big difference is that I was in a wheelchair, now I have a walker! And Chile also has a lot of advantages: litle stress, cleaner, less populated, beautiful country, (beautiful women), etc. Look for: Jacques Anquetil He´s my example(?) If they said to him: you can´t, he said: I can! So I am!
How does being Dutch change anything? do you honestly think that out of 2 milion people you are you only one "having a hard time"?Honestly ###### it up and take in what these people are trying to teach you they've supported you for so long now providing you with feedback.You are not the only person in the whole wide world with less then perfect conditions.Now what problems are you having with your code because this is going off topic too far
Link to comment
Share on other sites

2 million disabled people in Chile! Probably right! But no Dutchman! I doubt very much if another disabled person lives here alone (very strange here!). Why I moved to here? Simple, because I didn´t know before that the conditions for disabled persons are very poor here! (neither did I know that there´s a lot of discrimination!). A big difference is that I was in a wheelchair, now I have a walker! And Chile also has a lot of advantages: litle stress, cleaner, less populated, beautiful country, (beautiful women), etc. Look for: Jacques Anquetil He´s my example(?) If they said to him: you can´t, he said: I can! So I am!
Funny how you can quote others, but can't quote code...get a life now..so whats wrong with the code..other than that I outta here..if you are gonna go on with this ######...get back to your code problem..and leave the rest alone...
Link to comment
Share on other sites

as usual, these threads never stay on topic because you prefer to talk about anything but getting your code right (and all the mistakes end up being the same kind of mistakes anyway). I forsee a lot less help for you from this point forward from this forum. Nothing personal, but how long have we been helping you, and how far have you come? Maybe you would have a lot less stress if you tried to make money from doing something you were actually good at, or had any aptitude at whatsoever...

Link to comment
Share on other sites

How does being Dutch change anything? do you honestly think that out of 2 milion people you are you only one "having a hard time"?Honestly ###### it up and take in what these people are trying to teach you they've supported you for so long now providing you with feedback.You are not the only person in the whole wide world with less then perfect conditions.Now what problems are you having with your code because this is going off topic too far
No, all having a (very) hard time (sorry, you missed the message!)
Link to comment
Share on other sites

as usual, these threads never stay on topic because you prefer to talk about anything but getting your code right (and all the mistakes end up being the same kind of mistakes anyway). I forsee a lot less help for you from this point forward from this forum. Nothing personal, but how long have we been helping you, and how far have you come? Maybe you would have a lot less stress if you tried to make money from doing something you were actually good at, or had any aptitude at whatsoever...
No comments (too ridiculous!)
Link to comment
Share on other sites

Funny how you can quote others, but can't quote code...get a life now..so whats wrong with the code..other than that I outta here..if you are gonna go on with this ######...get back to your code problem..and leave the rest alone...
Sorry, I should have this post a personal message!
Link to comment
Share on other sites

Sorry, I should have this post a personal message!
Well good luck my friend with your database..for I have no problems getting the help I need..unless you finally got yours to work the way you wish it...Cheers..
Link to comment
Share on other sites

Just noticed something else but could be wrong...
echo "<tr><td>" . $row['Description'] . "</td>";

try this instead... ["Description"]."</td>"; try using the double " "

No, isn´t the error!
Link to comment
Share on other sites

Funny how you can quote others, but can't quote code...get a life now..so whats wrong with the code..other than that I outta here..if you are gonna go on with this ######...get back to your code problem..and leave the rest alone...
I´m again looking for the error, but your advice doesn´t help so far!
Link to comment
Share on other sites

I´m again looking for the error, but your advice doesn´t help so far!
Okay????Post the error message you get when you excute the file...please..Edited @ 1:37pm Hey, I am not willing to read all of the posts here..so humour me..and post the screen message you get when you excute the file...it will be a start ..if not then I say goodbye..you seem not willing to very helpful..you just give us bits and pieces of info..we can't work with that...to help you solve your problems..Also from the first posts of yours you seemed to think that your insert form would display your data...thats wrong you have to create another file to display the users data they inserted...at least thats what I did..they gents here are very helpful they helped me quite well..if you check my posts for " Adding Data "..you will see the results of their help...Cheers...
Link to comment
Share on other sites

I wouldn't take it personally. This is certainly not the first thread by this user to end up in this state of "devolvement". If you had signed up about 6 months ago, you would know exactly what we're talking about. By now we've just gotten used to.

Link to comment
Share on other sites

I wouldn't take it personally. This is certainly not the first thread by this user to end up in this state of "devolvement". If you had signed up about 6 months ago, you would know exactly what we're talking about. By now we've just gotten used to.
Thanks..wasn't about to take it personal..I'm done here with him..its up to you guys..hope he finds a solution...I know that even though at times I even have a hard time understanding what exactly what you mean..I do manage to figure it out sooner or later...thanks bud..
Link to comment
Share on other sites

I wouldn't take it personally. This is certainly not the first thread by this user to end up in this state of "devolvement". If you had signed up about 6 months ago, you would know exactly what we're talking about. By now we've just gotten used to.
Ok, thanks! Yes, you already know (too long!) me and know what I want (hopefully!) (see topic: Explain nr. 3!)
Link to comment
Share on other sites

Ok, thanks! Yes, you already know (too long!) me and know what I want (hopefully!) (see topic: Explain nr. 3!)
yeah, it wasn't intended to a compliment. :)
Link to comment
Share on other sites

yeah, it wasn't intended to a compliment. :)
I know! Another question: Can I write in a php file aswell an INSERT as a SELECT query?
Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.


×
×
  • Create New...