
skidmark10
Members-
Posts
27 -
Joined
-
Last visited
Never
Profile Information
-
Gender
Not Telling
skidmark10's Achievements

Member (2/5)
0
Reputation
-
Hello, Does anyone know the php code to display mysql table names?
-
Selecting more than two mysql tables tables using php?
skidmark10 replied to skidmark10's topic in MySQL Help
Yes I mean "JOIN". Sorry I am new to this. -
Hello, I am trying to select more than two mysql tables using php. All of the tables have one column in common "Client_ID". Does anyone know how I would pull information from all the columns with the same "Client_ID"? I don't have a code I'm working with yet, I'm stumped.
-
Select mysql & display in an html table using php
skidmark10 replied to skidmark10's topic in PHP Coding Help
I apologize for that, I'm gonna have to get more sleep, and quit being mean to people! Thank you so much! -
Select mysql & display in an html table using php
skidmark10 replied to skidmark10's topic in PHP Coding Help
I tried a similar code (not the code I posted) I put this and got a parse error echo "<td>" . $row['FirstName'] . " . $row['LastName']"</td>" ; Then I tried your code too and received a parse error echo "<td>" . $row['FirstName'] . ' ' . $row['Last_Name']"</td>"; -
Select mysql & display in an html table using php
skidmark10 replied to skidmark10's topic in PHP Coding Help
I don't think that works, I keep receiving the same error as before :-\ Parse error: syntax error, unexpected T_CONSTANT_ENCAPSED_STRING, expecting ',' or ';' -
Hello, I am trying to retrieve and display data from a mysql table into a html table using php. I am using this code and it works successfully. <?php mysql_select_db("my_db", $con); $result = mysql_query("SELECT * FROM Persons"); echo "<table border='1'> <tr> <th>Firstname</th> <th>Lastname</th> </tr>"; while($row = mysql_fetch_array($result)) { echo "<tr>"; echo "<td>" . $row['FirstName'] . "</td>"; echo "<td>" . $row['LastName'] . "</td>"; echo "</tr>"; } echo "</table>"; mysql_close($con); ?> However, I want $row['FirstName'] and $row['LastName'] to appear in the SAME cell of the html table, next to one another. How would I write the code for that, if it is possible Thanks in advance!
-
I'm sorry, forgot to mention that I have an html form that posts data into the mysql table. phpmyadmin is what I'm using for my database.
-
Hello, I am using an html form where users submit their date of birth into a column in my mysql table. I am using phpmyadmin. I also have a table for current age that should get the users current age based on the information they submitted into the "date of birth" column. What date function would allow me to do the above? Also, where would I put that function? Again, I am using phpmyadmin.
-
I have an html form with checkbox answers. I want to store the answers in ONE mysql column. When I select for checkbox answers, only the very last one shows up in the column, but I have it enumerated so I don't know why it shows up like that. Any suggestions?
-
How can I put in the error-handling logic? This is all of my php code (minus my database connection code), I'll post my html code so you can see the form. HTML <form name="input" action="fetchclientprofile.php" method="GET"> <center> Client ID <input type="text" name="clientid" /><br /> </center> <center> <input type="submit" value="Retrieve" /> </center> PHP $sql = "SELECT * FROM `Partners_Body_Types` WHERE Client_ID= " .$_POST['clientid']. ""; $query = mysql_query($sql); echo "<table border='0'> <tr> <th>Client ID</th> <th>Partner's Body Type</th> <th>Partner's Body Type</th> <th>Partner's Body Type</th> <th>Partner's Body Type</th> </tr>"; while ($row = mysql_fetch_array($query)) { echo "<tr>"; echo "<td>" . $row['Client_ID'] . "</td>"; echo "<td>" . $row['Slim_Slender'] . "</td>"; echo "<td>" . $row['Average'] . "</td>"; echo "<td>" . $row['Athletic'] . "</td>"; echo "<td>" . $row['Heavy'] . "</td>"; echo "</tr>"; } echo "</table>"; mysql_close($con); ?>
-
I am still receiving the error Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource after making the corrections. Is there anything else I can do? $sql = "SELECT * FROM `Partners_Body_Types` WHERE Client_ID= " .$_POST['clientid']. ""; $query = mysql_query($sql); echo "<table border='0'> <tr> <th>Client ID</th> <th>Partner's Body Type</th> <th>Partner's Body Type</th> <th>Partner's Body Type</th> <th>Partner's Body Type</th> </tr>"; while ($row = mysql_fetch_array($query)) { echo "<tr>"; echo "<td>" . $row['Client_ID'] . "</td>"; echo "<td>" . $row['Slim_Slender'] . "</td>"; echo "<td>" . $row['Average'] . "</td>"; echo "<td>" . $row['Athletic'] . "</td>"; echo "<td>" . $row['Heavy'] . "</td>"; echo "</tr>"; } echo "</table>"; mysql_close($con); ?>
-
I've never encountered this error: Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource Does anyone knows where it stems from, and ways to fix it? Here's my code just in case. $sql = "SELECT * FROM `Partners_Body_Types` WHERE Client_ID=" .$_POST['clientid']. ""or die ('Error: '.mysql_error ()); $query = mysql_query($sql); echo "<table border='0'> <tr> <th>Client ID</th> <th>Partner's Body Type</th> <th>Partner's Body Type</th> <th>Partner's Body Type</th> <th>Partner's Body Type</th> </tr>"; while ($row = mysql_fetch_array($sql)); { echo "<tr>"; echo "<td>" . $row['Client_ID'] . "</td>"; echo "<td>" . $row['Slim_Slender'] . "</td>"; echo "<td>" . $row['Average'] . "</td>"; echo "<td>" . $row['Athletic'] . "</td>"; echo "<td>" . $row['Heavy'] . "</td>"; echo "</tr>"; } echo "</table>"; mysql_close($con); ?>