User Profile

Collapse

Profile Sidebar

Collapse
yasmine
yasmine
Joined: Feb 11 '08
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • yasmine
    replied to Mysql error
    Thanks a lot mwasif.
    I didn't use single quotes for separation. Now its working well.


    Thank u very much....

    Regards
    Yas.......
    See more | Go to post

    Leave a comment:


  • yasmine
    replied to Return Multiple Rows In A String
    Hi
    You can do this by 2 ways.

    1. use implode() function of php.
    2. use group_concat() function in mysql.

    your problem is already discussed here.
    Refer the thread Comma Separated which is in MySQL forum.

    Thanx n Regards
    Yas......
    See more | Go to post

    Leave a comment:


  • yasmine
    started a topic Mysql error

    Mysql error

    Hi friends,

    I don't know whether this thread is related to this forum or php forum.
    Please forgive me, if i had done this mistake.

    Can anyone tell me is it possible to write a query attached with php variable in where clause?

    for example,

    [CODE=text]$nm=implode("," ,$si[name]);
    $result=get_rec ords_sql("selec t name, id from a where name in ($nm)");
    ...
    See more | Go to post

  • yasmine
    started a topic Conversion of object to array

    Conversion of object to array

    Hi friends,

    I'm retrieving a field from a database which contains comma separated values.
    I'm using 'get_records_sq l("select query")' for this and it returns my expected output.
    My problem is it return values as standard class object. But i need it as in array format.

    If i'm using 'mysql_fetch_ar ray' or 'mysql_query', it returns only one row.

    Can anybody tell me what i have to...
    See more | Go to post

  • yasmine
    replied to Reading Dump
    Thanks a lot.... for ur valuable replies......
    I'm amazing, how easy these things are......


    Thanx n Regards
    Yas...
    See more | Go to post

    Leave a comment:


  • yasmine
    started a topic Fetch array values

    Fetch array values

    Hi friends,

    I'm having a table which stores id as comma separated in string datatype.
    I want to fetch each of the value in a row in the form of array such as follows:

    table:
    sid name
    2,3,5,7,9... Apple
    19,37,46,1... Orange

    What i need is,
    array[0]=2 array[1]=3......

    each comma separated value should be in separate array....
    See more | Go to post

  • yasmine
    replied to how to make transaction tables
    Hi
    first u have to create the transaction payment table by using CREATE TABLE command. The trans_id field should be a primary key with auto_increment property.

    Then, u can insert values from the master tables by executing insert query as

    [CODE=mysql]insert into trans_payment(s ell_id,buy_id,p roduct_id,total _pay, pay_method) values(select a.sell_id, b.buy_id, a.product_id, a.total_pay,a.p ay_method from seller a,...
    See more | Go to post

    Leave a comment:


  • yasmine
    started a topic Reading Dump

    Reading Dump

    Hi friends,

    can anyone tell me how can I read dump values from one database to another?
    I can't understand the dump concept properly. can anybody explain it?
    what command we have to use to dump tables?

    I have to dump one large table from one database to another.
    what is the command for it?
    Please help me out.

    Thanx n Regards
    Yas...
    See more | Go to post

  • yasmine
    replied to Comma Separated
    The Correct code to do it is as follows:

    [CODE=mysql]CREATE TABLE a (SELECT content, cast( group_concat( survey_id ) AS char ) , count( * ) count FROM b GROUP BY content ORDER BY count DESC LIMIT 30[/CODE]

    Thanx n Regards
    Yas..
    See more | Go to post

    Leave a comment:


  • yasmine
    replied to Comma Separated
    Hi Ashok,
    yes, exactly u r right.... am using phpMyAdmin.
    Now i understood well on these things.
    Thank U very much...........

    Regards
    Yas......
    See more | Go to post

    Leave a comment:


  • yasmine
    replied to Comma Separated
    Hi friends......

    Thanks a lot............ .. for ur valuable replies......
    I fixed this by changing the sid field structure from integer to text. when i set text datatype to the sid field it automatically takes care on comma separation.


    Special thanks to Ashok kumar.

    I'll meet u people in threads soon with some other doubts

    Thanx n regards
    Yas....
    See more | Go to post

    Leave a comment:


  • yasmine
    replied to Comma Separated
    Hi
    Thanx 4 ur coding.
    I tried it. but still i got [BLOB - 1.0 KB] in sid field (all values).
    I read the description for GROUP_CONCAT() in the following link.
    But i can't understand it properly...
    Can u help me out........ It tells about the BLOB.

    The link isGROUP_CONCAT()

    Thanx n Regards
    Yas........
    See more | Go to post

    Leave a comment:


  • yasmine
    replied to Comma Separated
    Hi chaarmann,
    Thanks for ur coding.
    But i'm having very large amount of entries in my table.
    So, i can't do it.
    anyway,
    Thanx n Regards
    Yas..........
    See more | Go to post

    Leave a comment:


  • yasmine
    replied to Comma Separated
    yah....
    i'm having the mysql version 4.1.11.

    Thanks for the coding

    This query works well and creates a table. But the survey id field does not contain comma separated values.
    The sid field contains only [BLOB - 1.0 KB] values for all the rows.
    I don't know what is it.
    Can u help me.........????

    Thanx n Regards
    Yas...........
    See more | Go to post

    Leave a comment:


  • yasmine
    started a topic Comma Separated

    Comma Separated

    Hi friends,
    I need to create a table which refers the fields from an existing table as follows:

    [CODE=mysql]Create table a (select content,sid, count(*) count from b group by content order by count desc limit 0,30)[/CODE]

    This code works well and creates a table.
    But the content field having different sid's for each value.
    ex:

    content sid
    Apple 3
    Apple 5...
    See more | Go to post

  • yasmine
    replied to Consolidating Values
    in PHP
    Hi
    What i'm asking is,
    consider a database which contains so many tables like course, questionnaire,e tc.

    One of the table having a field about feedback_catego ries such as faculty effectiveness, course effectiveness, course structure, duration, etc.
    For each of the course the feedback_catego ries may or may not differs.
    Consider the feedback_catego ries fiels contains 100's of values that may or may not repeated....
    See more | Go to post

    Leave a comment:


  • yasmine
    started a topic Consolidating Values
    in PHP

    Consolidating Values

    Hi friends,
    How can i consolidate the values of a table which occurs mostly?
    what i'm asking is
    consider a database which contains many tables. Each table has a field namely contents. The value of it may be repeated or not within a single table.
    what i need is how can i consolidate some of the values of contents field which occurs commonly in all or more tables?

    Please help me out...

    Thanx...
    See more | Go to post

  • yasmine
    replied to Finding New record insertion
    Thanks a lot yaar........... ..

    Now I understood....
    See more | Go to post

    Leave a comment:


  • yasmine
    replied to Finding New record insertion
    Thanx again,
    Can u tell me what is this 'NEW' keyword refers?
    This code doesn't show the fields on users table na?
    I want what ever values will be inserted into the users table should be reflect on the exam table.

    Help me out..........
    See more | Go to post

    Leave a comment:


  • yasmine
    replied to Finding New record insertion
    hi
    Thanks 4 ur reply.
    I didn't understand clearly what u r saying.
    Is there anything wrong with my logic?
    How can i create trigger for inserting the same values which inserted on another table? Is it possible?
    Can you show me those lines?

    [CODE=mysql]create trigger ins_trig after insert on users for each row
    begin
    insert into exam values(select username,qualif ication from users where...
    See more | Go to post

    Leave a comment:

No activity results to display
Show More
Working...