Jump to content

Zane

Administrators
  • Posts

    4,362
  • Joined

  • Last visited

  • Days Won

    11

Everything posted by Zane

  1. LIMIT 1, 15 LIMIT 16, 25 etcetera
  2. You are absolutely right! SELECT * FROM tutor_preferred_district ORDER BY district_id ASC LIMIT 15
  3. What's happnin'
  4. That would only work if you had an element with an ID of 'forename' Unfortunately, you are using forename as a name for an element. Although, you can still give that element an ID of forename manually and it will work, why can't you use what I suggested? You said yourself in your OP that it put the cursor in the correct place
  5. ooh, Get this one! http://www.hightech-edge.com/custom_laptop-custom_pc-steampunk-datamancer-watch_video/1303/
  6. This, if($i % 3 == 0) echo ""; } Should be at the BEGINNING of your loop, not the end.
  7. could you not just add what you did to start with to your Visibility function? function setVisibility(id, visibility) { document.getElementById(id).style.display = visibility; document.edit_name.forename.focus() }
  8. Read up on the MySQL manual on creating tables http://dev.mysql.com/doc/refman/5.1/en/create-table.html Take extra special notes on the "IF NOT EXISTS" part!
  9. There is this way, this snippet here http://snipplr.com/view/28115/getelementsbyattribute/ Or you could do it the 2010 way, use jquery. With jquery, it's as simple as having a statement like this $("*[rel='ajax']").click(function() { alert("This element has a REL attribute with a value of AJAX!!!!"); })
  10. Instead of having incrementing dynamic numbers for a name, you can use an array instead. This way, on the PHP side you can use the implode() function to create your columns list for your SQL. For visual help, ... look below Change this to this And change your Javascript, accordingly... like this var cellRight2 = row.insertCell(1); var e1 = document.createElement('input'); e1.type = 'text'; e1.name = 'txtRow[]'; e1.class = 'txtRow' e1.size = 20; cellRight1.appendChild(e1); But as far as adding multitudes of rows in your SQL, you're probably better off doing multiple INSERT statements. For instance, lets say someone adds 30+ new inputs. If you use only one INSERT statement for that, this assumes you have columns reserved for every permutation of added inputs; which is a horrible table layout btw. Don't fret either, multiple INSERT statements doesn't mean multiple mysql_query calls. You can append each new INSERT statement to one single variable and use that on one query.. as INSERTs, UPDATEs and DELETEs are designed this way.
  11. This is a common problem for PHP newcomers; x records per x columns. It is in this situation that you make use of PHP's modulus operator It is this operator that allows you to divide a number by X, but only get the remainder of it. Combine this with a counter to three and you have your solution. For example, using your current code... modified a bit. $dbc = mysqli_connect('localhost', 'aliendatabase', '1234567', 'aliendatabase') or die(mysqli_error()); $query = ("SELECT * FROM tutor_preferred_district ORDER BY district_id ASC"); $sql = mysqli_query($dbc, $query) or die(mysqli_error()); echo'</pre> <table>'; // Start your table outside the loop... and your first row $count = 0; // Start your counter while($data = mysqli_fetch_array($sql)) { /* Check to see whether or not this is a *new* row If it is, then end the previous and start the next and restart the counter. */ if ($count % 3 == 0) { echo ""; $count = 0;} echo ''; echo ''.$data['district_name'].''; $count++ //Increment the count } echo "</table>"; //Close your last row and your table, outside the loop<br>?&g
  12. The real source to this is return When you return something within a function, you can call that function as if it were a variable. If your add_tax function had just simply multiplied your argument and exited, you wouldn't have got anything; an error at the least. Using MathewJ's example..as an example, you can see that when test is called it will return a string with the two arguments concatenated echo test("this and", "that"); would yield: this and that.
  13. SELECT LOWER(city) ....
  14. It's ORDER BY... LIMIT not GROUP BY
  15. Try an INNER JOIN instead... and if the delete column is varchar, put the quotes back. I should have asked that to begin with. Alternatively, you could try an OUTER JOIN, but I would try INNER first.
  16. This topic has been moved to MySQL Help. http://www.phpfreaks.com/forums/index.php?topic=312346.0
  17. Perhaps take 0 out of quotes?
  18. Get one hard drive for each file
  19. Zane

    i386 on x64 system?

    So, here's the update I successfully moved the partition... it took close to 9 hours, jesus! Meanwhile, I downloaded the x64 ISO version. When the partition was done with its thing I restarted and changed CDs. It turns out that it was the 32-bit OS showing me less, because now it is showing that I have 750.2GBs. On the other hand, it's only showing that I have 3.6 GB of RAM. It must be going bad I guess? Either way, alls well now and I'm tinkering with stuff. Trying to get Wine running correctly.. apparently I need something called JACK Control to mimic an ASIO driver or something.. everyday in a linux world is a new adventure.
  20. Zane

    i386 on x64 system?

    Well, I've downloaded and burnt the x64 version to a disk. The only thing holding me back now is the wait for Gparted. to move and copy my 500G backup partition (NTFS) to the end of the drive, which has taken close to 8 hours already and still it's not done. @roopurt, is it normal for a 32-bit OS not to recognize all 750GB of my HDD? Because currently it's only showing 698.94GB
  21. Zane

    i386 on x64 system?

    Yeah, there is. I just for some reason took the chance of using the i386 version in hopes of not having to use x64 versions of every app I decide to use. I guess I'll just have to go download that ISO now, sucks I can't do it in Live Mode. Nor can I burn CDs. .... I could possibly take the challenge of figuring out how to convert to x64.... but..... fuck that. Thanks for the heads up thorpe.
  22. Zane

    i386 on x64 system?

    For real! That blows. I have 4Gs atm and I've already downloaded the ISO... uninstalled Windows and am now using GParted in Live mode to move my backup drive to the end of the HDD. For some reason, I had unallocated space, before and after my 500G NTFS backup drive. Now I gotta wait like 3 hours for it to do its thing. Surely to god I can use my 4Gigs of RAM... I'll have to read up on that, unless you're absolutely positive about that. Damn, I was so hoping to get away with the i386 version in peace. x64 OSs have given me nothing but problems. EDIT: Ok, So I can't find any actual documentation anywhere saying Maverick Meerkat x86 supports a max of 2GB RAM, but looking at the System Monitor in Live Mode it shows only 3 GB. So, there's definitely something wrong there, but I'm hoping it's just the live mode........ hoping. EDIT2: Well I'll be damned, I just now noticed that the partition manager barely recognises 700MB (i.e 698.94) of my 750MB HDD...
  23. Zane

    i386 on x64 system?

    Possibly a dumb question, but besides the obvious reason: not being able to use 64-bit applications, are there any other cons using an i386 OS on a 64-bit CPU? I have an AMD Athlon II X4 620 Processor. I'm wanting to install the new Ubuntu 10.10 beta on it instead of Windows 7. I might possibly just install Win7 as a virtual machine afterward just to use my favorite apps, but my main concern is whether it will be less efficient than installing the x64 version. Another question, how hard would it be (assuming I did install the i386 kernel) to change it to x64 later on? Is it as easy as entering a command or would I have to format and redo everything from square one?
  24. If they're already in a txt file, separated by lines, you don't need a pattern Just use the file() function. It returns an array of each line.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.