litebearer
-
Posts
2,356 -
Joined
-
Last visited
Posts posted by litebearer
-
-
@Maq wouldn't be better to have a separate book table also where the author id was in the book table rather than the book id in the author table? (perhaps include ISBN in the book table also)
-
NOT a good idea to structure your table(s) that way.
Create a table named authors; id, fname, mname, lname
Aside...
what happens if:
brown, j (for jason)
brown, j (for jon)
brown, j (for john)
brown, j (for jim)
How will you distinguish (count them)?
-
named: joe.xls, sally.doc, just.some.text.txt, grumpy.old.man.php -- valid names
type: .xls, .doc, .txt, . php --- extension that lets computer/people what program is most likely to read/use the file
format: the actual 'structure' of the file content
-
Not a good idea to have multiple values in one field; however, if you insist on using that method look into LIKE
-
-
It would be helpful if you showed us your code (use the php tags)
-
You need some javascripting (client-side) rather than php (server-side)
-
I use an exceptionally easy to implement pagination script (NOT MINE) for photos; however, it is easily adapted to other content - http://www.nstoia.com/sat/disp_pag/
-
Rough concept
Concept (comments allowed based upon a new day is considered midnight GMT):
total_comments table
id, user_id
when a user makes a comment, check the total_comments table by COUNTING records where user_id = the user's id.
if count is >2, deny post, else add a record to the table and process the comment as normal.
cron job to run at midnite GMT - truncate the total_comments table
-
try...
$TAX = round($TotEarn - 7917, 2); $TAX = round($TAX * .25, 2); echo $TAX;
-
Take a look here, it may be of some help...
-
hmmm
in your form, try changing this
target="add_project.php"
to this
action ="add_project.php"
-
did check the site where you got the code to see if they define the function?
-
This statement....
However, since I have potential gaps in data, sometimes I get this (r3[2] in r2[2]'s spot):
leads me suspect the real issue is how you populate your db table.
based upon the example I provided (and we will address the grouping later) r3[2] should NEVER be in r2[2]'s spot unless your insert query did not leave r2[2] empty.
ie name, street, city - if my insert, for whatever reason, puts city in the street field, then I will have problems.
Time to show us how and why you are inserting data into your db table.
-
Being a firm believer in minimalist testing, try this example
<?PHP $query = "SELECT * FROM labc101 WHERE date='$curDay' ORDER BY period ASC"; $result = mysql_query($query, $link) or die {throw new Exception("Catastrophic Failure.", 10); if(mysql_num_rows<1) { echo "No records"; exit(); } ?> <table> <tr><td></td><td>result1</td><td>result2</td><td>result2</td><td>id</td><td>date</td><td>period</td></tr> <?PHP while($row = mysql_fetch_array($result)) { ?> <tr> <td>C101</td> <td><?PHP echo $row[0]; ?></td> <td><?PHP echo $row[1]; ?></td> <td><?PHP echo $row[2]; ?></td> <td><?PHP echo $row[3]; ?></td> <td><?PHP echo $row[4]; ?></td> <td><?PHP echo $row[5]; ?></td> </tr> <?PHP } echo "</table>"; ?>
-
show us your db table structure
-
-
put single quotes around the variables in your query. Also make it a habit to put your queries in strings, it makes it soooo much easier to debug
-
Do you see the problem? In your query you are trying to use an array named $x[]; yet you do not have said array. Look thru your code and find ALL the variable you are TRYING to use in your query ,w $x['x'], $x['y'] etc THAT is what should lead you to the solution to your issue
-
from your code, it should be an array. where do you set the value of $x[]?
-
try..
print_r($x);
-
post your code when using the echo $query
-
It helps when debugging to place your queries in a string. try...
$query = "SELECT * FROM `shop` WHERE `x`='".$x["x"]."' AND `y`='".$x["y"]."' AND `z`='".$x["z"]."' AND `plane`='".$x["plane"]."'"; echo $query;
-
php is server side. to have an image (or any content) change while the page is being viewed would require client-side scripting. ie javascript
PHP Single File help
in Third Party Scripts
Posted
The most obvious solution is to contact the creator of the script and ask her/him to you can achieve your objective.