Jump to content

pedro84

Members
  • Posts

    85
  • Joined

  • Last visited

Everything posted by pedro84

  1. Thanks for reply. Was really quite to do this. Cheers!
  2. Good day, I use oempro software and try to parse XMLReturn but it's not working for me, simplexml_load_string return tons of errors. Maybe someone could help me? pending.php?XMLReturn=<%3Fxml version%3D"1.0" encoding%3D"utf-8"%3F><response><Success><![CDATA[1]]><%2FSuccess><ErrorCode><![CDATA[0]]><%2FErrorCode><SubscriberID><![CDATA[11]]><%2FSubscriberID><RedirectURL><![CDATA[http%3A%2F%2Fflivoo.com%2Fcustomers%2Fmario%2Fpending.php]]><%2FRedirectURL><%2Fresponse> This is how the GET string looks, how to parse it?
  3. I have question, is it possible to ead file attributes with PHP?
  4. I got form sending with "post" method. I got problem with submiting it. When I use mod_rewrite: browse/filter/ the form is not working, I got info about query error. When I use browse/filter (without ending slash) it works perfectly. Is it possibility to force it to work with ending slash? mod_rewrite rule: RewriteRule ^browse/([a-zA-Z0-9]+)$ index.php?module=albums&action=$1 [L]
  5. Hi! I got three tables: musicians, bands and musicians_bands. In musicians and database I'm storing all musicians and bands data. I musicians_bands table I store informations about bands of specifics musicians they were members. Now question. I got following query: $query = mysql_query("SELECT * FROM musicians, bands, musicians_bands where (musicians_bands.id=musicians.id) and (musicians_bands.id=bands.id) group by bands.id"); I returns for me: Artist 1 - Band 1 Artist 2 - Band 2 Artist 1 - Band 3 How to force it to display: Artist 1 - Band 1, Band 3 Artist 2 - Band 2 ?
  6. I have tried many options. I cannot do it. I think $track_num need to be reset after [disc 2] when text field is: [disc 1] # track # track # track # track [disc 2] # track # track # track
  7. Two more questions How to force it to number only rows containing "#" character? How to force to reset numbering in case where album is two disc release?
  8. Here you are:) Array ( [0] => ) Array ( [0] => ) Array ( [0] => ) Array ( [0] => # [b]Hour 1[/b] [1] => # [b]The Game of Life[/b] [2] => # We Were Born to Fly [3] => # The Future Never Dies [4] => # You're Lovin' Me to Death [5] => # 321 [6] => # Love Will Keep Us Alive [7] => # Your Last Song [8] => # Love Is War [9] => # Rise Again [10] => # The Cross [11] => # Humanity [12] => # Cold [b] [13] => # Humanity [b] )
  9. You're right:) It's more difficult than I thought:(
  10. I know about it. Whole code is: $id = $_GET['id']; $query = mysql_query("SELECT * FROM releases where band_id='$id' order by release_year asc"); $i=0; while($r = mysql_fetch_assoc($query)) { $tracklist = nl2br($r['tracklist']); $tl = str_replace('#', $i+1, $tracklist); echo $tl; echo $i; $i++; echo ' <tr> <td style="width:170px;">'.$r['title'].'</td> <td style="width:170px;">'.$r['type'].'</td> </tr> '; } But inserting $i=0; before while loop does not wolve my problem.
  11. $id = $_GET['id']; $query = mysql_query("SELECT * FROM releases where band_id='$id' order by release_year asc"); $i=0; while($r = mysql_fetch_assoc($query)) { $tracklist = nl2br($r['tracklist']); $tl = str_replace('#', $i+1, $tracklist); echo $tl; $i++; with following code I got: 4 [b]Hour 1[/b] 4 [b]The Game of Life[/b] 4 We Were Born to Fly 4 The Future Never Dies 4 You're Lovin' Me to Death 4 321 4 Love Will Keep Us Alive 4 Your Last Song 4 Love Is War 4 Rise Again 4 The Cross 4 Humanity 4 Cold [b] 4 Humanity [b]
  12. Sorry for doubling posts. There must be something wrong, cause I applied following code: $i=0; $tl = str_replace('#', rand(), $r['tracklist']); echo $tl; $i++; and everything returns the same output... 1193242228 [b]Hour 1[/b] 1193242228 [b]The Game of Life[/b] 1193242228 We Were Born to Fly 1193242228 The Future Never Dies 1193242228 You're Lovin' Me to Death 1193242228 321 1193242228 Love Will Keep Us Alive 1193242228 Your Last Song 1193242228 Love Is War 1193242228 Rise Again 1193242228 The Cross 1193242228 Humanity 1193242228 Cold [b] 1193242228 Humanity [b]
  13. Once again, thanks for interesting:) $id = $_GET['id']; $query = mysql_query("SELECT * FROM releases where band_id='$id' order by release_year asc"); while($r = mysql_fetch_assoc($query)) { $i=2; $tracklist = nl2br($r['tracklist']); $tl = str_replace('#', $i+1, $tracklist); echo $tl; $i++; Only numbering does not work.
  14. Thanks for answer But still returns: 1 [b]Hour 1[/b] 1 [b]The Game of Life[/b] 1 We Were Born to Fly 1 The Future Never Dies 1 You're Lovin' Me to Death 1 321 1 Love Will Keep Us Alive 1 Your Last Song 1 Love Is War 1 Rise Again 1 The Cross 1 Humanity 1 Cold [b] 1 Humanity [b]
  15. Hi, I got problem. I have album tracklist in MySQL text field. After using nl2br I'd like to auto numbering rows. I added "#" at the beggining of each line and now it looks as following: # [b]Hour 1[/b] # [b]The Game of Life[/b] # We Were Born to Fly # The Future Never Dies # You're Lovin' Me to Death # 321 # Love Will Keep Us Alive # Your Last Song # Love Is War # Rise Again # The Cross # Humanity # Cold [b] # Humanity [b] Ok. But I got problem. I tried to replace "#" with number but it does not work for me: $tracklist = nl2br($r['tracklist']); $tl = str_replace('#', $i+1, $tracklist); echo $tl; There's no error but I got: 1 [b]Hour 1[/b] 1 [b]The Game of Life[/b] 1 We Were Born to Fly 1 The Future Never Dies 1 You're Lovin' Me to Death 1 321 1 Love Will Keep Us Alive 1 Your Last Song 1 Love Is War 1 Rise Again 1 The Cross 1 Humanity 1 Cold [b] 1 Humanity [b] But I'd like to have it autonumbered. Any suggestions?
  16. Thanks for reply. This is first time I use UNION. Got the same error: $query = mysql_query("SELECT DISTINCT(band) FROM shows where format='video' ORDER BY band UNION SELECT * COUNT(band) FROM shows where format='video' ORDER BY band"); while($r = mysql_fetch_assoc($query)) {
×
×
  • 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.