Search found 5 matches

by sycodelic
Thu Jun 21, 2012 11:54 pm
Forum: SQL
Topic: Using the Rand() function
Replies: 8
Views: 2612

Re: Using the Rand() function

Thanks, I manage to work it out by adding another query and merging them together.
by sycodelic
Mon Jun 18, 2012 11:18 pm
Forum: SQL
Topic: Using the Rand() function
Replies: 8
Views: 2612

Re: Using the Rand() function

These are the extra error thrown.

[syntax=php]Fatal error: Call to a member function getrows() on a non-object in /home/public_html/index.php on line 161[/syntax]
by sycodelic
Mon Jun 18, 2012 10:41 pm
Forum: SQL
Topic: Using the Rand() function
Replies: 8
Views: 2612

Re: Using the Rand() function

$conn is defined in the config file.

[syntax=php]$conn = &ADONewConnection($DBTYPE);[/syntax]

[syntax=php]function cleanit($text)
{
return htmlentities(strip_tags(stripslashes($text)), ENT_COMPAT, "UTF-8");
}[/syntax]
by sycodelic
Mon Jun 18, 2012 9:58 pm
Forum: SQL
Topic: Using the Rand() function
Replies: 8
Views: 2612

Re: Using the Rand() function

Hi, I have added the whole index page. If I add the code you gave, I still see no errors. Just a blank page. [syntax=php]include("include/config.php"); include("include/functions/import.php"); $thebaseurl = $config['baseurl']; $s = cleanit($_REQUEST['s']); STemplate::assign('s',$...
by sycodelic
Sun Jun 17, 2012 10:59 pm
Forum: SQL
Topic: Using the Rand() function
Replies: 8
Views: 2612

Using the Rand() function

Hi, I am slowly learning a lot from the tutorials here about php/sql. I am listing certain columns from my database in order, one of which I require to be limited and taking random rows. I have tried for the last couple of days and so far, I seem to only be able to get them all random or just a blan...