I have this list of characters and I'm trying to figure out what I have to do to put the results of these functions into the table or what not. Keep in mine that these functions are included in a file that is with the bottom file.
Code: function getstatusname($statusid)
{
$query = "SELECT
s.name as status
FROM
efed_list_status as s
WHERE
s.id = '$statusid'";
$result = mysql_query ($query);
while ($row = mysql_fetch_assoc($result))
{
$status=cleanquerydata($row['status']);
return $status;
}
}
function getstylename($styleid)
{
$query = "SELECT
style.name as stylename
FROM
efed_list_styles as style
WHERE
style.id = '$styleid'";
$result = mysql_query ($query);
while ($row = mysql_fetch_assoc($result))
{
$style=cleanquerydata($row['stylename']);
return $style;
}
}
function getalignmentname($alignmentid)
{
$query = "SELECT
alignment.name as alignmentname
FROM
efed_list_alignment as alignment
WHERE
alignment.id = '$alignmentid'";
$result = mysql_query ($query);
while ($row = mysql_fetch_assoc($result))
{
$alignmentname=cleanquerydata($row['alignmentname']);
return $alignmentname;
}
}
Code: <?php {
print '<h1 class=backstage>Character Management</h1><br />';
print "<h2 class=backstage>Characters :: <a href="#" onclick="ajaxpage('addcharacter', 'content'); return false;">Add New</a></h2><br />";
{
$query = "SELECT * FROM efed_bio ORDER BY `charactername`";
$result = mysql_query ( $query ); // Run The Query
$rows = mysql_num_rows($result);
if ($rows > 0)
{
print '<table width="100%" class="table1">';
print '<tr class="rowheading">';
print '<td> </td>';
print '<td> </td>';
print '<td>Character Name</td>';
print '<td align=center width=100>Poser Name</td>';
print '<td align=center width=60>Style</td>';
print '<td align=center width=60>Alignment</td>';
print '<td align=center width=60>Status</td>';
print '</tr>';
// Fetch and print all records.
$i = 0;
$current_row = 0;
while ( $row = mysql_fetch_array ( $result, MYSQL_ASSOC ) ) {
$sClass = 'row2';
if ($i ++ & 1) {
$sClass = 'row1';
}
printf ( "<tr class="%s">", $sClass );
print "<td valign="top" align=center width=35><a href="#" onclick="ajaxpage('editcharacter', 'content'); return false;">Edit</a></td>";
print "<td valign="top" align=center width=25><a href="#" onclick="ajaxpage('bio', 'content'); return false;">Bio</a></td>";
printf ( "<td valign="top">%s</td>", $row [charactername] );
printf ( "<td align="center" valign="top">%s</td>", $row [posername] );
printf ( "<td align="center" valign="top">%s</td>", $row [style] );
printf ( "<td align="center" valign="top">%s</td>", $row [name] );
printf ( "<td align="center" valign="top">%s</td>", $row [name] );
print '</tr>';
}
print '</table>';
}
else
{
print '<span>There are characters.</span><br />';
}
print '<br />';
returnmain();
}
}
?>
Need help with simple code, back and forward buttons.
Basically, I have a set of pages in a folder, which have the title somephrasehere_09.php, somephrasehere_10.php, somephrasehere_11.php, etc. On each of these pages, I want to include a common code
Material Master Update through BAPI - Follow up material not updated
Hi Experts,
Export hangs
Hi all, please helpI have a Oracle 10.2.0.3.0 database. When I want to query the dba_segments or dba_directories views Oracle just hangs, and when I do a export that hangs aswell. I did a export
PHP and SMS
Hi all forum members. I am new here and am unsure what category shoild I post this in. Moderators: Please excuse me if this is in the wrong category.The problem is that I am assigned with the task of
Do not allow posting of whitespace
Currently the script below works if the user does not type a name/message, but if i create a whitespace with the spacebar, it will submit. How would I fix this?message page:<?php// Get the
Problems with array
This code is the last lines in an upload script that uploads 4 images at the same time and writes the url to these and som other information to the database. database structure: id img1 img2 img3
Wierd echo error?
Hi, i got the most wierd php error ever and i don't know why..Code: echo "<td><strong>MP:</strong></td>"; echo
I would like "for" to wait 5 sec
I would like my 'for' loop to wait 5 sec before second iteration.for ($i=0; $i<10; $i++){........//I would like it to wait 5 seconds here}
Posting Serialized Data Not Working
I am trying to send an object from one PHP file to another using POST. I serialize the object and then add slashes. For some reason, only part of the data is getting through. It appears to be a
Give me all your tricks for minimizing jar file size
Hi, I'm coming close to releasing my J2ME game... I am kicking up against the 64k size barrier which I have imposed as a maximum size for my game. I would like to add more levels to the game but the