True, and if she wants to continue and learn then fair play, and I hope she manages to build something great.

However, she's using a discontinued tool that outputs unmaintainable HTML, and developing her site clearly isn't her goal; letting people know about her jewelry (which looks fantastic, by the way Sanda) is.

Plus, as there's a products tab on her site, one would expect that some kind of 'web shop' is on the radar. That won't be doable in Webplus, and it's not the easiest thing to implement from scratch at the best of times.


I'd suggest using something like SquareSpace for this kind of site, rather than attempting to build it yourself. It has an e-commerce module built-in and plenty of easy templates to choose from.

A note unrelated to the original question, when at 100% zoom, I can only see 2/3 of the page, I need to scroll right to see the whole thing (or zoom out to about 80%).


I doubt it's your query that's slow. What happens if you simply run the query select * from Doopgegevens; in a shell? For ~10k rows, providing your table is holding 'normal' data (and not base64 encoded movie files or something) it should be fast. If it is fast, try changing your data list to only use a subset of your table's columns, which will indicate if that's where your performance problem is.


[QUOTE=red_ruewei;1694533]thanks for reply.
I try something like this to read record with range month and year.
Example from June, 2011 to June 2012
Select * from table where (YEAR(date1)>='$year1' AND MONTH(date1)>='$mon1') and (YEAR(TKH_date1)<='$year2' AND MONTH(TKH_date1)<='$month2')

i had test this. And run separately.
(YEAR(date1)>='$year1' AND MONTH(date1)>='$mon1')
For above code it run smoothly

(YEAR(TKH_date1)<='$year2' AND MONTH(TKH_date1)<='$month2')
But for this code, it fail....


Fails why? What error? What variables? Also, by calling YEAR(blah) you're going to bypass your indices and your query will be slow. Something like this is better and will work.

SELECT * FROM table WHERE date_data >= '2011-06-01' AND date_data < '2011-07-01';


[QUOTE=Xessa;884086]I want to get the row number of a specific row in the table.

Also is this legal?


INSERT INTO (SELECT * FROM myTable WHERE mynumber=2) VALUES ........


Getting the row number depends on the DB you're using; Oracle supports this (via [icode]ROWNUM[/icode]) but MySQL for example does not.

Your statement is invalid; if you want to update a row you should be doing:

update myTable set foo = 'bar' where mynumber = 2;


[QUOTE=Jx_Man;584701]i already installed ruby and in ruby directory contain fxri and Scite.
well, i m do small ex in fxri...
what is Scite for? what different about fxri and Scite? why i can't compile code in Scite?
i find compile in tools of Scite but it was disable.
example i write code in Scite :
[code=ruby]5.times { print "Odelay!" }[/code]
when i tried to compiled i can't do this perform. there are compile, Build,Go etc in tools option that i cannot perform to click, it was disable. i m confused.
But this code running great in fxri. so why i can't do compiled in Scite?
please help

Thank you.[/QUOTE]

Did your source file definitely have a .rb extension? Did anything at all appear in the output window?

Votes + Comments
Thank You For Directing friend :)

[QUOTE=eruder;501855]pty's improvement is a good one!

The only nit I have with it is that I wouldn't put the [ICODE]banner[/ICODE] method in the controller, since it has nothing to do with the "traffic cop" jobs that controllers normally do. I would put it in a helper file, either this controller's helper file or the [ICODE]application_helper.rb[/ICODE] file (if it's a method you'd want to use in other controllers).


Thanks Ed :)


[QUOTE=tefflox;498336]My solution ---

[code] <%=
def banner
i, n, span, str = 0, 0, String.new, "listenlightpoetryjournal"
until i == str.length do
span << "<span id=\"n" << n.to_s << "\" style=\"top: "
<< (rand(36) - 18).to_s << "px;\">" << str[i] << "</span>"
i, n = i + 1, n + 1
return span

No more PHP for this one.[/QUOTE]

Although your solution is fine it can be a little more readable (and re-usable) in rails.

In the controller:

def banner(text)
span = String.new
text.split(//).each_with_index do |c, i|
span += "<span id='#{i}' style='top:#{(rand(36)-18)}px;'>#{c}</span>\n"

Then in the view

<%= banner("listenlightpoetryjournal") %>


I find it easier to specify the join as follows and seperate the where clause; if your data is correct the following query should work:

table1 ap
table2 p on p.projID = ap.projID
and ap.userId = p.userId
p.projectID = 'test1'


[QUOTE=pmhayden;427657]I have a Database which is dealing with a book library system. I have a table which has a has a field dealing with the ReturnDate of a book. I was wondering if it is possible to do a SELECT statement that would return the the fines due on an overdrawn book at the database level instead of me having to do it in a Java environment.

In words what I want done:
IF (ReturnDate > CURDATE())
(ReturnDate - CURDATE()) * Fine

Thanks in advance

select id,
( cast(current_timestamp as date) - cast(return_date as date) ) * 3 as fine
from books
return_date > current_timestamp

This is how to do the select in postgresql however the syntax is going to be slightly different in MySQL (i think you should use now() instead of current_timestamp but I can't remember)


[QUOTE=briskal;364381]All right, I'll admit it - I'm ancient enough to be from the "old" school. In my case, this means I am a textual learner - I don't relate well to visuals.

Searching though the FAQs, I was delighted (and very appreciative) to find the list of Smilies - what they look like and - most importantly - what most of them actually mean! The one English acronym that puzzles me still is LOL - does this mean "lots of love" or "lots of laughs" or "lots of luck" or none of the above?

However, there are a number of different icons that show up to the left of the Threads in each forum. To me, these icons are meaningless - and they don't seem to relate to the optional icons that can be chosen when posting an entry.

For example, I posted a new thread in the Delphi/Pascal forum, and it shows up with something that looks (to me) like a pencil. What does that icon mean?

Question: is there a list of all of these icons and their meanings?


LOL stands for 'Laugh Out Loud'

I think the pencil icon means that you are subscribed (or have contributed to) that particular thread.