This forum is for module development and code related questions, not general module support. For general support, use the Post installation forum.

Using Hyperlinks to set Order By for columns in a table

Okay, so I have a page that displays a table listing all the books that I have Read. A user can check a checkbox off next to each one. If they submit it the books are added to a different database. Anyways, what I need help with it is allowing the user to order the table by the columns that are shown here (on the same page). I want to just make the column titles hyperlinks at which point they can select a column heading, it'll reload the page sorted by that heading. Reverse order would be nice on second click, but not needed.

I look around for tutorials for this, but couldn't find any or at least not ones that were simple enough for me to understand and apply to my own. Help is greatly appreciated.

Oh and when I say hyperlinks, I guess I just mean look like. I heard there was a way to do it with forms which is fine for me and it basically makes a button look like a hyperlink.

My code for the page:


<?php

global $user;

$db = mysql_connect("localhost", "collin","MYPASSWORD");

mysql_select_db("mydatabase_name",$db);

//add books to database that are checked
$query="SELECT a.book, a.rarity, a.price, a.sid FROM collector_books a LEFT JOIN collector_books_read b ON a.sid = b.sid and b.uid = $user->uid WHERE b.sid IS NULL";

$result=mysql_query($query);
$num=mysql_numrows($result);

$i=0;
while ($i < $num) {
$sid=mysql_result($result,$i,"sid");

Changing the file max upload size in audio/video modules ...

How do you increase the PHP file upload limit for audio/video from 2 megs to 50 megs? (q asked drupal forums)

My server suggested I change the line in the php.ini script to allow 50 megs, and then copy this code in the audio and video module files. I tried this, and I still get the error message 'A file must be provided.' in red.

There must be a way to do this through admin, no? Please help meh!

SAM 3 Radio Website Plugin

this is basic read for starter..

SAM 3 is a radio application which has capabilities to run information to a website via mysql and php
Its runs off any Radio server (shoutcast etc) and has alotta extras

now theres a base website that comes with the program called SAMPHPWEB and has at the moment basic

NOW PLAYING
PLaylist/REQUEST SONG
I had setup more through PHPnuke (but it has a slow start up and basically the code getting old for me)

Problem with aggregator

I am trying to use this feed: http://movies.go.com/xml/rss/intheaters.xml, but it will not work with the Drupal aggregator. My other feeds work. Anyone have any wisdom to share?

*new* online module, comments please

Hello,

I made a small module for drupal 4.7.x that shows users online status in view profile page.
The module also provides "API function" for other modules to easily check if an user in online or
not.

Example usage:
To display posters online status in forums with easy to use themable function.
Check the source code of .module for an example!

While waiting for cvs approval to drupal.org, I'd like to hear some comments about this module.

activelect how?

i have installed activelect and category module. but i see no change in my dropdown lists. can you send an example container-category tree so i can set up my categories properly?

Pages

Subscribe with RSS Subscribe to RSS - Module development and code questions