Announcement

Collapse
No announcement yet.

help with database query

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • help with database query

    i have a question how do i do 2 things

    1. how to i make a query to find items in a database to search by id and name and post info

    2. how do i make all the same items above plus make it as a add items into a data base plus when a user enters the info there user name is added to the post...

    i made a table for my data base here is the info :
    PHP Code:
     CREATE TABLE `info` ( 
    `
    infoidint(10NOT NULL auto_increment
    `
    infonamevarchar(255NOT NULL default '0'
    `
    useridint(10unsigned NOT NULL default '0'
    `
    infonumbertext NOT NULL
    PRIMARY KEY (`serialid`), 
    KEY `userid` (`userid`) 
    TYPE=MyISAM

  • #2
    Use to grab data
    SELECT postinfo, name FROM table WHERE id = $id

    And this to update data
    UPDATE table SET postinfo='$postinfo', name='$name' WHERE id = '$id'
    Trent Gillespie Mod Theater Gillespie Photography

    Comment

    widgetinstance 262 (Related Topics) skipped due to lack of content & hide_module_if_empty option.
    Working...
    X