Gå til innhold

[Løst]MySql og PHP


Anbefalte innlegg

Videoannonse
Annonse
Nyttig informasjon:-)...

 

i phpMyAdmin får jeg opp følgende:

SELECT COUNT( * ) AS `Rader` , `user_email`

FROM `phpbb_users`

GROUP BY `user_email`

ORDER BY `user_email`

LIMIT 0 , 30

 

Dette gir meg alle e-mailene(eller 30), så hvorfor funker den ikke nå?

Du kan prøve følgende. Det skal dumpe hele brukertabellen din.

error_reporting(E_ALL);

mysql_connect('server','brukernavn','passord');

mysql_select_db('database');

 

$resource = mysql_query("SELECT * FROM phpbb_users");

$users = mysql_fetch_assoc($resource);

$rader = mysql_num_rows($resource);

 

echo '<pre>';

print_r($users);

echo '</pre>';

Lenke til kommentar

Dette får jeg da opp, vet ikke helt hva som skjer...

 

 

Array ( [user_email] => )

Array

(

[user_id] => 1

[user_type] => 2

[group_id] => 1

[user_permissions] =>

000000000000

000000000000

[user_perm_from] => 0

[user_ip] =>

[user_regdate] => 1250271545

[username] => Anonymous

[username_clean] => anonymous

[user_password] =>

[user_passchg] => 0

[user_pass_convert] => 0

[user_email] =>

[user_email_hash] => 0

[user_birthday] =>

[user_lastvisit] => 0

[user_lastmark] => 0

[user_lastpost_time] => 0

[user_lastpage] =>

[user_last_confirm_key] =>

[user_last_search] => 0

[user_warnings] => 0

[user_last_warning] => 0

[user_login_attempts] => 0

[user_inactive_reason] => 0

[user_inactive_time] => 0

[user_posts] => 6

[user_lang] => nb

[user_timezone] => 0.00

[user_dst] => 0

[user_dateformat] => d M Y H:i

[user_style] => 1

[user_rank] => 0

[user_colour] =>

[user_new_privmsg] => 0

[user_unread_privmsg] => 0

[user_last_privmsg] => 0

[user_message_rules] => 0

[user_full_folder] => -3

[user_emailtime] => 0

[user_topic_show_days] => 0

[user_topic_sortby_type] => t

[user_topic_sortby_dir] => d

[user_post_show_days] => 0

[user_post_sortby_type] => t

[user_post_sortby_dir] => a

[user_notify] => 0

[user_notify_pm] => 1

[user_notify_type] => 0

[user_allow_pm] => 1

[user_allow_viewonline] => 1

[user_allow_viewemail] => 1

[user_allow_massemail] => 0

[user_options] => 895

[user_avatar] =>

[user_avatar_type] => 0

[user_avatar_width] => 0

[user_avatar_height] => 0

[user_sig] =>

[user_sig_bbcode_uid] =>

[user_sig_bbcode_bitfield] =>

[user_from] =>

[user_icq] =>

[user_aim] =>

[user_yim] =>

[user_msnm] =>

[user_jabber] =>

[user_website] =>

[user_occ] =>

[user_interests] =>

[user_actkey] =>

[user_newpasswd] =>

[user_form_salt] => 77f77f5c47bdc35c

[user_wpuint_id] =>

[user_wpublog_id] =>

)

Lenke til kommentar
<?php
error_reporting(E_ALL);

$connect = mysql_connect('server','brukernavn','passord');
$database = mysql_select_db('database', $connect);

$sql = mysql_query("SELECT `user_email` FROM `phpbb_users` GROUP BY `user_email` ORDER BY `user_email` LIMIT 0,30");

while($row = mysql_fetch_array($sql)) {

echo $row['user_email'];

}
?>

Lenke til kommentar

Opprett en konto eller logg inn for å kommentere

Du må være et medlem for å kunne skrive en kommentar

Opprett konto

Det er enkelt å melde seg inn for å starte en ny konto!

Start en konto

Logg inn

Har du allerede en konto? Logg inn her.

Logg inn nå
  • Hvem er aktive   0 medlemmer

    • Ingen innloggede medlemmer aktive
×
×
  • Opprett ny...